Too many notifications => max_check_attempts useless?

Sebastien Barbereau barbereau at easynet.fr
Wed Mar 12 23:30:54 CET 2003


Hello,
yes you're right but ... one may think that max_check_attempts works with the check_interval.
For example, one would expect that if you set max_check_attemps to 5, nagios +would check the host 5 times with a one minute interval betwen the checks (like it is for services). This is not the case.
Here is an example log file:
[22:05:23] HOST ALERT: fw-ns-msi;DOWN;HARD;3;FPING CRITICAL - 2.1.4.238 (loss=100.000000%, rta=0.000000 ms)
[22:05:23] HOST ALERT: fw-ns-msi;DOWN;SOFT;2;FPING CRITICAL - 2.1.4.238 (loss=100.000000%, rta=0.000000 ms)
[22:05:22] HOST ALERT: fw-ns-msi;DOWN;SOFT;1;FPING CRITICAL - 2.1.4.238 (loss=100.000000%, rta=0.000000 ms)


As you can see all checks are execute immetiatly without any consideration for check_interval and interval_length ...

And the most surprising (at least for me) about this is that this is the "wanted" behaviour. If you look at the nagios source code you'll see that host checks are run without any delay or schedule time.
This can be found around line 1452 of checks.c

The only "delay" you could get in your host check is the delay or timeout of your host-check-command.

I think this is a job for the developpers ... maybe some feature request?!

hope this helps,




On Sun, Mar 02, 2003 at 05:37:19PM +0000, Ian Chilton wrote:
> Hello,
> 
> >  How can I set up nagio, so that notifications are ONLY sent out after
> >  a certain number of tests?
> 
> 
> In hosts.cfg, when you setup the host, use something like this:
> 
> max_check_attempts      5
> 
> This means, when the host is found down, it is only marked as "soft
> down" - it needs to fail 5 checks to be marked as "hard down" and a
> notification to be sent. Or, as the docs describe it:
> 
> max_check_attempts: This directive is used to define the number of times
> that Nagios will retry the host check command if it returns any state
> other than an OK state. Setting this value to 1 will cause Nagios to
> generate an alert without retrying the host check again. Note: If you do
> not want to check the status of the host, you must still set this to a
> minimum value of 1. To bypass the host check, just leave the
> check_command option blank.  
> 
> 
> Hope this helps
> 
> --ian
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
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