Passive host down result is interpreted as up on master

Thomas Guyot-Sionnest dermoth at aei.ca
Mon Mar 19 17:27:16 CET 2007


On 19/03/07 11:44 AM, Ton Voon wrote:
> Hi!
> 
> [..]
> 
> We think we've found the root problem.
> 
> In checks.c, if a host does not have a check_command, there is a debug
> line that says: "No host check command specified, so no check will be
> done (host state assumed to be unchanged)". However, it then returns
> HOST_UP. We have amended this to return hst->current_state instead.
> 
> In our distributed setup, we define a host without a check_command,
> instead relying on the passive host results sent by the slave. However,
> on the master, if a service on this host passes its freshness threshold,
> a host check is scheduled, with the force flag. This then gets to this
> portion of the code and returns a HOST_UP state rather than the current
> state, thus showing an incorrect state for the host.
> 
> Our patch is below, made against nagios 2.8.

I haven't looked at the full check.c source but the first thing that
comes to my mind: What happens if the host does not have a previous
state (i.e. pending)?

Shouldn't it set it to OK if state is pending, otherwise set it to last
state? I guess the idea there was to avoid hosts sticking in pending
state...

Just my 2 cent...

Thomas

Thomas

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




More information about the Developers mailing list