Re: [Nagios-devel] NAGIOS_LASTHOSTSTATE and NAGIOS_LASTSERVICESTATE
Posted: Fri Jan 16, 2009 4:53 pm
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christian Mies wrote:
> Hi Devel List,
> I found an Issue, in the Nagios 3.0.6 Environment due to writing an
> advanced notification script.
> I want to use NAGIOS_HOSTSTATE and NAGIOS_LASTHOSTSTATE.
> If my Hoststate changed from DOWN to UP everything looks good.
> Vice versa I get NAGIOS_HOSTSTATE=DOWN (is correct) and
> NAGIOS_LASTHOSTSTATE=DOWN (wrong, must be UP).
>
> In the NAGIOS_SERVICESTATE and NAGIOS_LASTSERVICESTATE there will be the
> same issue.
>
> Can anybody confirm these issues?
The DOWN notification usually happens on the 3rd attempt, so the two
last attempts were down as well.
You could record the state changes to disk with an event handler and use
them in your script instead.
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJcLkx6dZ+Kt5BchYRAgOhAJ40URBWS5lZmgbD6HGLu5yy8Fo2mwCgptPd
4HP5sZJD5vmss7a3dFW54YU=
=vi+u
-----END PGP SIGNATURE-----
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Hash: SHA1
Christian Mies wrote:
> Hi Devel List,
> I found an Issue, in the Nagios 3.0.6 Environment due to writing an
> advanced notification script.
> I want to use NAGIOS_HOSTSTATE and NAGIOS_LASTHOSTSTATE.
> If my Hoststate changed from DOWN to UP everything looks good.
> Vice versa I get NAGIOS_HOSTSTATE=DOWN (is correct) and
> NAGIOS_LASTHOSTSTATE=DOWN (wrong, must be UP).
>
> In the NAGIOS_SERVICESTATE and NAGIOS_LASTSERVICESTATE there will be the
> same issue.
>
> Can anybody confirm these issues?
The DOWN notification usually happens on the 3rd attempt, so the two
last attempts were down as well.
You could record the state changes to disk with an event handler and use
them in your script instead.
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJcLkx6dZ+Kt5BchYRAgOhAJ40URBWS5lZmgbD6HGLu5yy8Fo2mwCgptPd
4HP5sZJD5vmss7a3dFW54YU=
=vi+u
-----END PGP SIGNATURE-----
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]