change service check timeout in Nagios

Michael W. Lucas mwlucas at blackhelicopters.org
Mon Jun 29 21:46:53 CEST 2009


Hi,

It appears that numerous people have had this issue, but most of them
have it because they're doing something else wrong or have other
issues.  I have a check that legitimately takes longer than 10 seconds
to complete, and none of the documentation or archives appear
relevant.

I run check_vrrp against hardware on the other side of the world.
(I've suggested that I install a monitor closer to the remote
equipment, but that's just not feasible right now.)  Running
check_vrrp by hand gets me an answer in 14-17 seconds.

# /usr/bin/time -h /usr/local/libexec/nagios/check_snmp_vrrp.pl -H hostname -C community -s backup -t 20
8 vrid backup :OK
        14.58s real             0.43s user              0.17s sys
#

When I use this plugin in Nagios, however, it errors out with:

CRITICAL - Plugin timed out after 10 seconds 

Yes, I know it times out in 10 seconds.  The plugin takes 14-17
seconds to run.  The timeout appears to be within Nagios itself, as
the script doesn't time itself out.

Surely there's a built-in way to tell Nagios that either a particular
check can take longer, or increase the 10-second timeout within Nagios
itself?  The service_check_timeout value kills runaway processes,
which this isn't.  I know increasing the timeout would impact my
performance for my other apps, but I have a separate Nagios instance
for these devices.

If I can't change the timeout I'll write an external script that runs
the program and forwards the results to Nagios as a passive check, but
that seems unnecessarily cumbersome.

Any suggestions?  Am I missing something in the documentation?

Any help appreciated,

==ml

-- 
Michael W. Lucas 	mwlucas at BlackHelicopters.org, mwlucas at FreeBSD.org
http://www.BlackHelicopters.org/~mwlucas/
Latest book:  Cisco Routers for the Desperate, 2nd Edition
http://www.CiscoRoutersForTheDesperate.com/

------------------------------------------------------------------------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list