NAGIOS_LASTHOSTSTATE and NAGIOS_LASTSERVICESTATE - Variable

Thomas Guyot-Sionnest dermoth at aei.ca
Fri Jan 16 21:13:31 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas Guyot-Sionnest wrote:
> 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.
> 

Although we could consider adding $LASTHARDHOSTSTATE$ and
$LASTHARDSERVICESTATE$ for that purpose... Ethan?

If we need to modify structs exported to event broker modules it may
require waiting until the next major release though...

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJcOpr6dZ+Kt5BchYRAhU2AJ9mBlRqN7Mk9083ChbS4NOkXGMiiQCgizlh
Xy4N9tXyl4BK0eNGjfFcgSA=
=QAPe
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword




More information about the Developers mailing list