Host check doesn't wait in-between checks.

Jan Kratochvil lace at jankratochvil.net
Tue Jun 6 20:48:15 CEST 2006


Hi,

it is being discussed here again and again. Some working solution(s) attached.


Regards,
Lace


On Tue, 06 Jun 2006 20:37:04 +0200, Josh Konkol wrote:
> Kyle Tucker <kylet <at> panix.com> writes:
> 
> > 
> > > 
> > > What is the point of setting a Host max_check_attempts if 
> Nagios isn't going to
> > > wait in between checking?
> > 
> > I too wish I had more time between host checks and you've prompted me
> > to try something in my check_alive script. Would this snippet do the 
> > trick?
> > 
> > TIMEGAP=10  # number of seconds before host checks
> > 
> > if [ $HOSTSTATE$ = "DOWN" -a $HOSTSTATETYPE$ = "SOFT" ]
> > then
> > 	sleep $TIMEGAP
> > fi
> > 
> > exit 2
> > 
> > I would have used ...
> > 
> > if [ $HOSTSTATE$ = "DOWN" -a $HOSTATTEMPT$ -lt 
> $MAXHOSTATTEMPT$ ]
> > then
> > 	sleep $TIMEGAP
> > fi
> > 
> > ... but oddly there seems to be no $MAXHOSTATTEMPT$ macro.
> > 
> 
> 
> OK so the simple solution would be to change my check-host-command 
> to include a sleep 10 at the end.  i.e.:
> 
> $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% 
> -p 3 && sleep 10
> 
> You think that would work?
> 
> Josh
-------------- next part --------------
An embedded message was scrubbed...
From: Jan Kratochvil <lace at jankratochvil.net>
Subject: [Nagios-users] [patch] Workaround for 'Host DOWN' false-positives
Date: Sat, 20 May 2006 18:17:35 +0200
Size: 9959
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060606/b9fe6b8e/attachment.mht>
-------------- next part --------------
An embedded message was scrubbed...
From: Joerg Linge <pitchfork at ederdrom.de>
Subject: Re: [Nagios-users] [patch] Workaround for 'Host DOWN' false-positives
Date: Sun, 21 May 2006 16:08:40 +0200
Size: 5595
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060606/b9fe6b8e/attachment-0001.mht>
-------------- next part --------------
An embedded message was scrubbed...
From: Joerg Linge <pitchfork at ederdrom.de>
Subject: Re: [Nagios-users] [patch] Workaround for 'Host DOWN' false-positives
Date: Tue, 23 May 2006 15:38:24 +0200
Size: 6044
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060606/b9fe6b8e/attachment-0002.mht>
-------------- next part --------------
_______________________________________________
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