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
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]