NAGIOS_LASTHOSTSTATE and NAGIOS_LASTSERVICESTATE - Variable
Larry Low
llow at telesphere.com
Fri Jan 16 21:28:20 CET 2009
> 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...
I second that idea. I ran into this as well and just wrote my notification scripts around it.
>
> - --
> Thomas
------------------------------------------------------------------------------
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