NAGIOS_LASTHOSTSTATE andNAGIOS_LASTSERVICESTATE - Variable

Christian Mies cmies at itnovum.de
Mon Jan 19 10:18:40 CET 2009


I know that the Down on the last retry notfications is set. But I don't
get the Informations about the last host state if the status is
switching from down to up. or the service changed the state from
CRITICAL to OK.
If the Service or Host switch from OK to CRITICAL/WARNING or UP to DOWN
everything is working as designed.

Regards
Christian
Am Freitag, den 16.01.2009, 12:28 -0800 schrieb Larry Low:
> > 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
> it-novum GmbH
Ein Unternehmen der Mehler AG
  
Christian Mies
Consultant Systemmanagement
  
Edelzeller Straße 44   
36043 Fulda            
  
FON:            +49 (661) 103-874      (-333)
FAX:            +49 (661) 103-17874            (-334)
MAIL:           cmies at itnovum.de
WEB:            http://www.itnovum.de
  
Handelsregister:                  Amtsgericht Fulda, HRB 1934
Geschäftsführer:                  Michael Kienle
Sitz der Gesellschaft:            Fulda, Deutschland/Germany
UstID-Nr:                         DE813211784
Steuernr.:                        018/225/03095
  
Der Inhalt dieser E-Mail ist vertraulich. Wenn Sie nicht der eigentliche Empfänger sein sollten, informieren Sie bitte sofort den Absender oder vernichten umgehend diese Mail. Jegliche unerlaubte Vervielfältigung oder Weiterleitung dieser Mail ist strengstens verboten.
  
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of material in this e-mail is strictly forbidden.
_______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 


------------------------------------------------------------------------------
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