flap detection + state retention

Tom Throckmorton throck at duke.edu
Thu Jan 24 21:17:33 CET 2008


*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.

I haven't yet tried 3.x, so I don't know if it's still an issue there, but I
can confirm that this did work in 1.x.

Steps to repeat:

- find a host/service for which flapping is enabled
- disable flap detection for that host/service; wait until that state is
  reflected in the extended info.  Optionally check the status / retention
  files for appropriate values.
- reload / restart
- check the state of flap detection - has it reverted to enabled?

You can also see this behavior by toggling global flapping and then reloading.

Any insight is appreciated,

-tt


On Jan 23 17:16, Tom Throckmorton wrote:
> Nagios 2.10, CentOS 5 x86_64 / i386, NDOUtils 1.4b6
> 
> Hi all,
> 
> I've noticed something odd wrt flapping, and am wondering if I'm overlooking
> something simple, or just misunderstanding the way flapping and state retention
> are supposed to work.
> 
> First, just to verify, my main nagios config has:
> 
>  enable_flap_detection=1
>  retain_state_information=1
>  state_retention_file=/var/log/nagios/retention.dat
>  retention_update_interval=<1,5,60 or even 0, doesn't matter>
>  use_retained_program_state=1
>  use_retained_scheduling_info=1
> 
> In my global host and service templates that all hosts use, I have:
> 
>  flap_detection_enabled          1
>  retain_status_information       1
>  retain_nonstatus_information    1
> 
> I've also disabled flap detection explicitly for a few hosts, and it all works
> as advertised.
> 
> However, for any host/service, if I manually disable/enable flap detection via
> an external command / cgi, and then reload or restart, the option reverts to
> whatever is in the config for that given host/service.  This happens regardless
> of whether 1) the option is being set in retention.dat, which it is, 2) the
> NDO-fed database thinks flapping for this host/service is disabled, or 3) w/out
> the broker_module enabled.  Other state options are being preserved (such as
> active_checks_enabled) both at retention_update_interval and on a reload.
> 
> So, what I think I'm seeing then is that during a reload, the
> flap_detection_enabled option isn't getting read from the retention file at
> program start, though I'd expect it to be persistent just as the other options
> are.  FWIW, same behavior on earlier Nagios 2.x releases, but 1.x seems to do
> the right thing.
> 
> Before I dig further, can anyone verify that the state of host or service flap
> detection (enabled/disabled) should or shouldn't be persistent across a
> reload/restart?  I've combed the docs and archives, and am coming up dry.
> 
> Thanks,
> 
> -tt
> 
> 
> -- 
> Tom Throckmorton
> OIT - CSI
> Duke University
> 
> -------------------------------------------------------------------------
> 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/
> _______________________________________________
> 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

-- 
Tom Throckmorton
OIT - CSI
Duke University

-------------------------------------------------------------------------
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