is there a way to set host min_check_attempt?
Thomas Stocking
tstocking at groundworkopensource.com
Mon Mar 26 22:20:57 CEST 2007
Hi Dinçer,
Not quite sure I follow your logic, but it looks like you want to
control what happens with Nagios host checks.
Nagios will check the host if and when a service on that host enters a
non-ok state. It then executes the plugin that you select as a
host-alive check. If it comes back with a non-ok status on the first
attempt, it will try again, up to the max number of attempts. If all
attempts fail, it sets to host to state DOWN (or UNREACHABLE - see the
parent directive). It then send a host alert, and notifications, if
configured.
If it comes back OK, it stops checking the host, and sets it to OK. Then
you will get a service alert, notifications, etc.
So, one way to be sure that you always ping 5 times when you are
checking a host is to configure the plugin you use for the host-alive
check to send 5 pings on each attempt:
$USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -n 5
for example.
You could also use a passive check to set the host state. This is a
pretty advanced topic, but will give you great control over host checks.
One thing to consider is that Nagios 2.x and 1.x use a "blocking" host
check. That is, whenever a host check is performed (actively), Nagios
stops doing pretty much everything else. Thus it makes sense to optimize
your active host checks. The longer they take, the larger the affect on
overall latency. This will be fixed in v3, or so I have read. I have not
tried v3 yet :)
Thomas
Dinçer Kavraal wrote:
> Hi, (as to be numbers are only sample)
> We know that host assumed to be DOWN if host does not reply (or
> timeout) for 5 times successively (I mean 5 distinct checks in order).
> Do you know how to make nagios assume that host is UP only and only if
> host says OK to ping check for 5 times successively after a HARD-DOWN
> status?
>
>
>
>
> 2007/3/25, Andy Shellam <andy.shellam-lists at mailnetwork.co.uk
> <mailto:andy.shellam-lists at mailnetwork.co.uk>>:
>
> Also, in your check_ping command definition, you're requesting the
> host
> respond within 30ms to be classed as up and OK.
>
> This seems awfully quick - personally I request 1000ms (1 second) to
> give it a fair amount of time to respond. If the
> host/router/whatever
> is busy, it could take slightly longer than 30ms to reply, causing a
> warning (or longer than 60ms to be 'down'.)
>
> Andy.
> [...]
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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