freshness_threshold bug - big problem

Rodney Ramos rodneyra at gmail.com
Mon Dec 20 20:04:07 CET 2010


OK, Andreas,

I raised a patch on the tracker at http://tracker.nagios.org, issue number
0000184.

It is running on my Nagios production environment and is working fine until
now.

Thanks a lot,
Rodney.

On Mon, Dec 20, 2010 at 3:50 PM, Andreas Ericsson <ae at op5.se> wrote:

> On 12/20/2010 05:52 PM, Rodney Ramos wrote:
> > Hi, Jochen,
> >
> > Thank you again. I think that you found where the problem is, I mean, the
> > base/checks.c::is_host_result_fresh() code.
> >
> > I change the lines in the checks.c as below:
> >
> > ========================================================
> > FROM: Lines 2439 - 2440
> >
> >   if(temp_host->freshness_threshold==0)
> >
> >
> freshness_threshold=(temp_host->check_interval*interval_length)+temp_host->latency+additional_freshness_latency;
> >
> > TO:
> >
> >          if(temp_host->freshness_threshold==0){
> >                  if(temp_host->state_type==HARD_STATE ||
> > temp_host->current_state==STATE_OK)
> >
> >
> freshness_threshold=(temp_host->check_interval*interval_length)+temp_host->latency+additional_freshness_latency;
> >                  else
> >
> >
> freshness_threshold=(temp_host->retry_interval*interval_length)+temp_host->latency+additional_freshness_latency;
> >                  }
> > ========================================================
> >
> > It is working well, as expected. My retry interval is 1 minute and hosts
> are
> > taking about 2 minutes to change SOFT states.
> >
> > The logs are:
> >
> > BEFORE the changes:
> >
> > [1292854105] Warning: The results of host 'host1' are stale by 0d 0h 0m
> 1s
> > (threshold=0d 0h 5m 15s).  I'm forcing an immediate check of the host.
> > [1292857824] Warning: The results of host 'host1' are stale by 0d 0h 0m
> 1s
> > (threshold=0d 0h 5m 15s).  I'm forcing an immediate check of the host.
> > [1292859117] Warning: The results of host 'host1' are stale by 0d 0h 0m
> 52s
> > (threshold=0d 0h 5m 15s).  I'm forcing an immediate check of the host.
> >
> >
> > AFTER the changes:
> >
> > [1292859297] Warning: The results of host 'host1' are stale by 0d 0h 0m
> 59s
> > (threshold=0d 0h 1m 38s).  I'm forcing an immediate check of the host.
> > [1292859417] Warning: The results of host 'host1' are stale by 0d 0h 0m
> 31s
> > (threshold=0d 0h 1m 22s).  I'm forcing an immediate check of the host.
> > [1292859597] Warning: The results of host 'host1' are stale by 0d 0h 0m
> 47s
> > (threshold=0d 0h 1m 44s).  I'm forcing an immediate check of the host.
> >
> > So, I´d like to known the developers opinion. It´s a bug or it´s not?
>
> It definitely seems like a bug.
>
> > Are
> > you intending to change the source code? If not I will have to change it
> > myself always when a new Nagios version is released.
> >
>
> Or you can go with door nr 3 and submit a patch to make the necessary
> changes. I won't have time to look into this until god knows when, but I
> do have time to apply patches and run some rudimentary tests which, along
> with your assertation that it works as per expectations in your network,
> should suffice to get it into the first release after I get the patch.
>
> Thanks.
>
> --
> Andreas Ericsson                   andreas.ericsson at op5.se
> OP5 AB                             www.op5.se
> Tel: +46 8-230225                  Fax: +46 8-230231
>
> Considering the successes of the wars on alcohol, poverty, drugs and
> terror, I think we should give some serious thought to declaring war
> on peace.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20101220/f78f24a5/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list