Re: [Nagios-devel] freshness_threshold bug - big problem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] freshness_threshold bug - big problem

Post by Guest »

--0016e6dd86273b3ef80497dc2ffa
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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 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, t=
he
> > base/checks.c::is_host_result_fresh() code.
> >
> > I change the lines in the checks.c as below:
> >
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
> > FROM: Lines 2439 - 2440
> >
> > if(temp_host->freshness_threshold=3D=3D0)
> >
> >
> freshness_threshold=3D(temp_host->check_interval*interval_length)+temp_ho=
st->latency+additional_freshness_latency;
> >
> > TO:
> >
> > if(temp_host->freshness_threshold=3D=3D0){
> > if(temp_host->state_type=3D=3DHARD_STATE ||
> > temp_host->current_state=3D=3DSTATE_OK)
> >
> >
> freshness_threshold=3D(temp_host->check_interval*interval_length)+temp_ho=
st->latency+additional_freshness_latency;
> > else
> >
> >
> freshness_threshold=3D(temp_host->retry_interval*interval_length)+temp_ho=
st->latency+additional_freshness_latency;
> > }
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
> >
> > It is working well, as expected. My retry interval is 1 minute and host=
s
> 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=3D0d 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=3D0d 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=3D0d 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=3D0d 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=3D0d 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=3D0d 0h 1m 44s). I'm forcing an immediate check of the host=
.
> >
> > So, I=B4d like to known the developers opinion. It=B4s a bug or it=B4s =
not?
>
> It definitely seems like a bug.
>
> > Are
> > you intending to change the source code? If not I will have to change i=
t
> > 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 [email protected]
> 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.
>

--0016e6dd86273b3ef80497dc2ffa
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

OK, Andreas,I raised a patch on the tracker at <a href=3D"http://tr=
acker.nagios.org/" class=3D"e

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked