OK, Andreas,<br><br>I raised a patch on the tracker at <a href="http://tracker.nagios.org/" class="external free" title="http://tracker.nagios.org" rel="nofollow">http://tracker.nagios.org</a>, issue number 0000184.<br><br>
It is running on my Nagios production environment and is working fine until now.<br><br>Thanks a lot,<br>Rodney.<br><br><div class="gmail_quote">On Mon, Dec 20, 2010 at 3:50 PM, Andreas Ericsson <span dir="ltr"><<a href="mailto:ae@op5.se">ae@op5.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On 12/20/2010 05:52 PM, Rodney Ramos wrote:<br>
> Hi, Jochen,<br>
><br>
> Thank you again. I think that you found where the problem is, I mean, the<br>
> base/checks.c::is_host_result_fresh() code.<br>
><br>
> I change the lines in the checks.c as below:<br>
><br>
> ========================================================<br>
> FROM: Lines 2439 - 2440<br>
><br>
>   if(temp_host->freshness_threshold==0)<br>
><br>
> freshness_threshold=(temp_host->check_interval*interval_length)+temp_host->latency+additional_freshness_latency;<br>
><br>
> TO:<br>
><br>
>          if(temp_host->freshness_threshold==0){<br>
>                  if(temp_host->state_type==HARD_STATE ||<br>
> temp_host->current_state==STATE_OK)<br>
><br>
> freshness_threshold=(temp_host->check_interval*interval_length)+temp_host->latency+additional_freshness_latency;<br>
>                  else<br>
><br>
> freshness_threshold=(temp_host->retry_interval*interval_length)+temp_host->latency+additional_freshness_latency;<br>
>                  }<br>
> ========================================================<br>
><br>
> It is working well, as expected. My retry interval is 1 minute and hosts are<br>
> taking about 2 minutes to change SOFT states.<br>
><br>
> The logs are:<br>
><br>
> BEFORE the changes:<br>
><br>
> [1292854105] Warning: The results of host 'host1' are stale by 0d 0h 0m 1s<br>
> (threshold=0d 0h 5m 15s).  I'm forcing an immediate check of the host.<br>
> [1292857824] Warning: The results of host 'host1' are stale by 0d 0h 0m 1s<br>
> (threshold=0d 0h 5m 15s).  I'm forcing an immediate check of the host.<br>
> [1292859117] Warning: The results of host 'host1' are stale by 0d 0h 0m 52s<br>
> (threshold=0d 0h 5m 15s).  I'm forcing an immediate check of the host.<br>
><br>
><br>
> AFTER the changes:<br>
><br>
> [1292859297] Warning: The results of host 'host1' are stale by 0d 0h 0m 59s<br>
> (threshold=0d 0h 1m 38s).  I'm forcing an immediate check of the host.<br>
> [1292859417] Warning: The results of host 'host1' are stale by 0d 0h 0m 31s<br>
> (threshold=0d 0h 1m 22s).  I'm forcing an immediate check of the host.<br>
> [1292859597] Warning: The results of host 'host1' are stale by 0d 0h 0m 47s<br>
> (threshold=0d 0h 1m 44s).  I'm forcing an immediate check of the host.<br>
><br>
> So, I´d like to known the developers opinion. It´s a bug or it´s not?<br>
<br>
</div></div>It definitely seems like a bug.<br>
<div class="im"><br>
> Are<br>
> you intending to change the source code? If not I will have to change it<br>
> myself always when a new Nagios version is released.<br>
><br>
<br>
</div>Or you can go with door nr 3 and submit a patch to make the necessary<br>
changes. I won't have time to look into this until god knows when, but I<br>
do have time to apply patches and run some rudimentary tests which, along<br>
with your assertation that it works as per expectations in your network,<br>
should suffice to get it into the first release after I get the patch.<br>
<br>
Thanks.<br>
<font color="#888888"><br>
--<br>
Andreas Ericsson                   <a href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>
OP5 AB                             <a href="http://www.op5.se" target="_blank">www.op5.se</a><br>
Tel: +46 8-230225                  Fax: +46 8-230231<br>
<br>
Considering the successes of the wars on alcohol, poverty, drugs and<br>
terror, I think we should give some serious thought to declaring war<br>
on peace.<br>
</font></blockquote></div><br>