Re: [Nagios-devel] How to know the last state of a host in a eventhandler
Posted: Sun Feb 26, 2006 11:42 am
> I'm writing a simple eventhandler, and I'm wondering how to know the
> last state of a host.
>
> For example, if we go into a HARD "UP" state, how to know if we are
> coming from a SOFT or a HARD error state ??
>
> Why isn't there a $PREVIOUSHOSTSTATETYPE$ macro available ?
Hi, (answering to myself)
Finally, I was mistaken...
At the beginning, I thought that when we was recovering from a (soft or
hard) error state, we would receive the macro
$HOSTSTATETYPE$ = "HARD" (because the state is now a "HARD" UP).
But after some testing, I realized that the event actually receive
$HOSTSTATETYPE$ = "SOFT" when recovering
from a SOFT state, and $HOSTSTATETYPE$ = "HARD" when recovering from a
HARD state !!
So, everything is OK now !!
I don't need any other macro !
Thanks,
Philippe Ferreira.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> last state of a host.
>
> For example, if we go into a HARD "UP" state, how to know if we are
> coming from a SOFT or a HARD error state ??
>
> Why isn't there a $PREVIOUSHOSTSTATETYPE$ macro available ?
Hi, (answering to myself)
Finally, I was mistaken...
At the beginning, I thought that when we was recovering from a (soft or
hard) error state, we would receive the macro
$HOSTSTATETYPE$ = "HARD" (because the state is now a "HARD" UP).
But after some testing, I realized that the event actually receive
$HOSTSTATETYPE$ = "SOFT" when recovering
from a SOFT state, and $HOSTSTATETYPE$ = "HARD" when recovering from a
HARD state !!
So, everything is OK now !!
I don't need any other macro !
Thanks,
Philippe Ferreira.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]