(Service Check Timed Out)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
scrizo
Posts: 4
Joined: Thu Dec 29, 2016 9:52 am

(Service Check Timed Out)

Post by scrizo »

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
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: (Service Check Timed Out)

Post by avandemore »

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
scrizo
Posts: 4
Joined: Thu Dec 29, 2016 9:52 am

Re: (Service Check Timed Out)

Post by scrizo »

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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: (Service Check Timed Out)

Post by rkennedy »

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
Locked