Host check doesn't wait in-between checks.
Josh Konkol
samba at guidemail.com
Tue Jun 6 20:37:04 CEST 2006
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
_______________________________________________
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