Service check timeouts

Marc Powell marc at ena.com
Mon Nov 24 21:48:12 CET 2008


On Nov 24, 2008, at 9:58 AM, Deborah Martin wrote:


> However, every now and again I get an error 'Service Check Timed  
> Out' and
> the exit status changes to CRITICAL automatically. But I'd rather it  
> didn't
> Is there a way to manipulate this exit status - I'd rather it was  
> set to
> UNKNOWN.

The only standard thing that would manipulate a plugin's exit status  
is the negate plugin but it doesn't look at the text of the response.  
Outside of enhancing nagios, none that I can think of.

> As far as I understand it, this error is based on the plugin itself  
> having a
> timeout which I've set to 120 seconds (nagios.cfg:
> service_check_timeout=120)
> The timeouts we set for the database vary between 15 and 90 seconds
> (depending on the each database requirement for this)

I'm not sure what you're trying to explain here. If your database  
checks can run at most 90 seconds, why is your database check plugin  
still running at 120 seconds? It sounds like that timeout isn't  
effective. Why don't you add an alarm/timeout to your plugin so that  
it will exit with your desired exit code before nagios kills it? Seems  
the easiest route to me.

> Or is there a way of looking at the $SERVICEOUTPUT$ string returned by
> Nagios and grepping for 'Service Check Timed Out' and manipulating the
> exit code that way ?

You'd have to add code to nagios; at the place where nagios is setting  
the plugin output to be 'Service Check Timed Out' would be a logical  
place. Nagios doesn't really care what the text output is so there is  
little in place to act on it, let alone change anything related to it.

--
Marc

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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