Max_check_attempts on hosts are beeing ignored?

Andreas Ericsson ae at op5.se
Tue Aug 24 11:40:00 CEST 2004


Sand Philipp wrote:
> Hi,
> 
> I ran into the following Problem. I've configured "max_check_attempts 4"
> on my hosts. I've configured some hosts which represent a site in our wan,
> which are connected with a main and a shadow line. When the main line goes
> down,  it takes about 1minute for the shadow to come up. I only want to get
> a notification when the shadow fails to get up! But when the host goes down,
> i recieve prompt notice and the check attempt show 1/4 and will never get to
> 2/4 or 3/4 or 4/4??!!
>
> It seems as if nagios simply ignores the max_check_attempts value :-/
> So I get an mail when the main goes down, and one minute later a recieve
> a mail the the host is recovered (because the shadow line is up now...)
> that's kind of getting on my nerves...
> Any suggestions what I did wrong and why the max_check_attempt is been
> ignored?
> 

Assuming max_check_attempts is set for the host (and not for the 
service), this is basically what happens;
Nagios notices any service as being down on the host. It immediately 
proceeds to run the host check command.
The host check command fails. Nagios runs host checks *SERIALIZED*, so 
it immediately retries, until it has done max_check_attempts check 
attempts (pretty logical, eh?).

Now, if you're using the default check-host-alive command, it would time 
out each check after 10 seconds. 4 checks * 10 seconds is 20 seconds 
LESS than the minute you're expecting the system to move to the 'shadow' 
line, which means Nagios would correctly detect it as being down.
Nagios then retries the host check with the check_interval interval 
decided in the host object definition, and the next time it notices the 
host as being up, so it correctly sends a recovery alert.

To fix it, either increas check-attempts to be more than 6, or increas 
the check timeout to 16 seconds or more (in checkcommands.cfg, by default).

> Regards,
> Philipp
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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