Event handler on Critical only?
Marc Powell
marc at ena.com
Thu Dec 4 18:01:26 CET 2003
> -----Original Message-----
> From: John Hearns [mailto:john.hearns at clustervision.com]
> Sent: Thursday, December 04, 2003 7:05 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Event handler on Critical only?
>
> Dear All,
> I have defined an event_handler which will shutdown a machine,
> should an alarm be reported from check_sensors.
>
> Is there any way I can arrange an event_handler to be called on
Critical
> states only, not on Warnings?
> Is it as simple as examining the value of $STATETYPE$
$STATETYPE$ will only be HARD or SOFT. You're looking for $SERVICESTATE$
or $HOSTSTATE$. You can't be selective about when Nagios executes the
event handler, but you can be particular about whether you actually do
anything or not based on those values. The example event handler script
on http://nagios.sourceforge.net/docs/1_0/eventhandlers.html does
exactly this.
--
Marc
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list