Page 1 of 1

Service Check Timeout

Posted: Mon Jun 27, 2016 7:42 am
by sjoerd
Hi there,

I am using a perl script as a service check and this check takes more then 60 seconds to run.
Is there a way to individualy extend the service check timeout, rather then to extend the default of 60 seconds for all service checks?

Cheers
Sjoerd

Re: Service Check Timeout

Posted: Mon Jun 27, 2016 12:21 pm
by lmiltchev
If you want to set up the plugin's timeout to a value greater than 60 sec, you will need to also increase the "default" timeout in the nagios.cfg file, i.e.

Code: Select all

service_check_timeout=120
and restart nagios:

Code: Select all

service nagios restart

Re: Service Check Timeout

Posted: Tue Jun 28, 2016 12:51 am
by sjoerd
Thanks for the response.
I can set this default timeout. However sometimes my perl script would take 2/3 minutes. If I set this default timeout then all service checks can potentially cause long timeouts.
Isn't there another way?

Re: Service Check Timeout

Posted: Tue Jun 28, 2016 9:35 am
by lmiltchev
Setting up the "global" timeout to let's say 120 doesn't mean that ALL of your scripts will be running for 120 sec. You have a granular control as most of the plugins provide a timeout option. Individual scripts won't run longer than their timeout value.