[patch] Re: flap detection + state retention

Ethan Galstad nagios at nagios.org
Mon Jan 28 16:05:36 CET 2008


Tom Throckmorton wrote:
> On Jan 24 15:17, Tom Throckmorton wrote:
>> *delurks*
>>
>> Hello all,
>>
>> Can someone here please verify that in Nagios 2.x the state of flap_detection
>> should or shouldn't be persistent across a reload / restart?
>>
>> See my post below, and the brief thread on nagios-users:
>>
>> http://thread.gmane.org/gmane.network.nagios.user/52044
>>
>> Tests on 2.x seem to show that the retained values for global/host/service flap
>> detection aren't being honored on a reload.  This seems to contradict the docs,
>> so I'm thinking it's a bug.
> 
> So, it looks as if the calls for modified_attributes were completely missing
> from the flapping routines, and appear to have been so since the inception of
> 2.x.  As i'm reading the code, these calls flag the attributes as modified,
> which means they'll be considered later in the state retention code.  Without
> the calls, the state retention code ignores these attributes, which leads to
> the problem.
> 
> Please consider the attached patch against base/flapping.c - this is against
> 2.10, which happens to be the same as CVS.  I'd appreciate it if someone with a
> better handle on the code (and better programming skills) would have a look to
> make sure I'm not doing something dumb.
> 
> I've tested this on 2.10 running on CentOS 5, and it appears to do the right
> thing regarding retaining state across reloads.
> 
> Cheers,
> 
> 
> -tt
> 

Thanks Tom - excellent patch.  I'll get this into CVS shortly.


Ethan Galstad
Nagios Developer
___
Email: nagios at nagios.org
Web:   www.nagios.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list