Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
kristan
This script has fulfilled a check we need so I thought I'd share a slight addition:
after the line
$status = "Rows $state - $count rows\n";
add
if ($count =~ m/\D/) { $state = "CRITICAL"; $status = "$count \n"; }
This returns the MySql error (if there is one) rather than just returning OK when unable to connect to the server or the check is not correct...
Also the condition needs to be an escaped string - ie.
host=\"localhost\" or if using NagiosQL to configure Nagios: host=\\\"localhost\\\"
after the line
$status = "Rows $state - $count rows\n";
add
if ($count =~ m/\D/) { $state = "CRITICAL"; $status = "$count \n"; }
This returns the MySql error (if there is one) rather than just returning OK when unable to connect to the server or the check is not correct...
Also the condition needs to be an escaped string - ie.
host=\"localhost\" or if using NagiosQL to configure Nagios: host=\\\"localhost\\\"