Page 1 of 1

SNMP Service Check Timeout

Posted: Mon Mar 19, 2018 10:28 am
by andrewatmacys
Right now, in my Nagios.cfg file, I have the service check timeout set to 90 seconds, but when I look in XI, the service checks are resetting every 10 seconds.

I was wondering If I'm missing something simple or if this is something that needs more than just the .cfg file needing change.

Thank you!

Re: SNMP Service Check Timeout

Posted: Mon Mar 19, 2018 10:40 am
by tmcdonald
The service_check_timeout option is used as a last-ditch effort to keep checks from running too long. From the documentation:
This is the maximum number of seconds that Nagios will allow service checks to run. If checks exceed this limit, they are killed and a CRITICAL state is returned. A timeout error will also be logged.

There is often widespread confusion as to what this option really does. It is meant to be used as a last ditch mechanism to kill off plugins which are misbehaving and not exiting in a timely manner. It should be set to something high (like 60 seconds or more), so that each service check normally finishes executing within this time limit. If a service check runs longer than this limit, Nagios will kill it off thinking it is a runaway processes.
There may be per-check or per-plugin timeouts built-in that are much shorter than this limit, in which case the plugin or check itself determines the timeout value. 10 seconds is a fairly common default. Without seeing the configs for the checks in question it is hard to say, but look into any checks with a -t flag - this usually indicates a timeout value, typically 10 seconds.

Re: SNMP Service Check Timeout

Posted: Mon Mar 19, 2018 10:54 am
by andrewatmacys
Thank you for the prompt reply, I'll look into the plugins and see if that's what's happening.

Re: SNMP Service Check Timeout

Posted: Mon Mar 19, 2018 3:25 pm
by npolovenko
@andrewatmacys, Which plugins are timing out? Can you upload their service definitions?