Hello All,
I have a custom service plugin that is a PHP script, that checks the health of some DB's and looks for a specific status return of 1 if everything is healthy it reports the following:
OK - All sources show that db server is healthy.
It is fine when I run this command from the plugin directory, however, nagios shows it as critical, I have included running the command from the CLI and used time to get an idea how long it takes to run this is the excerpt from that script using time /usr/lib64/nagios/plugins/check_mydbs
time /usr/lib64/nagios/plugins/check_mydbs
OK - All sources show that db server is healthy.
real 1m31.900s
user 0m0.081s
sys 0m0.021s
my nagios.cfg has the following for service_check_timeout=60 and service_check_timeout_state=c
My host has a bunch of other services it monitors as well with critical components, how can I modify this one check to take longer than the 60 seconds it is allowed.
The script contains the following response codes:
echo "OK - All sources show that db server is healthy.";
$errorMsg = "CRITICAL - One or more URLs showdb server is NOT healthy! URLs: ";
Also it does not use nrpe either
(Service Check Timed Out)
-
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: (Service Check Timed Out)
You probably want to look at the service_check_timeout in https://assets.nagios.com/downloads/nag ... gmain.html. Changing this value requires a reload or restart of the Nagios process.
Previous Nagios employee
Re: (Service Check Timed Out)
I have a bunch of services running that are mission critical, and changing the service_check_timeout will affect those services as well if I am not mistaken.
Re: (Service Check Timed Out)
It will be a global setting, yes. If you'd like your mission critical checks to end after a specified time, then I would specify a timeout at the plugin level.
Former Nagios Employee