execute script on event - wol when UPS status become OK

Marc Powell lists at xodus.org
Wed Sep 15 15:28:00 CEST 2010


On Sep 15, 2010, at 2:10 AM, Trnka Tomáš wrote:

> Hi,
> I`m searching best way to execute script on event but only when status become OK, not when HARD or CRITICAL,
> as described in event handlers http://nagios.sourceforge.net/docs/3_0/eventhandlers.html
> script should be executed only when status HARD or CRITICAL is reached.
> I would like to run wake on lan script when UPS status become OK – to wake up servers.

An event handler is exactly what you want. You've misread the documentation. Event handlers run under three different conditions -

	• Is in a SOFT problem state
		i.e. when performing retry checks leading to a WARNING or CRITICAL status.
	• Initially goes into a HARD problem state
		i.e. has reached max_attempts and is in a WARNING or CRITICAL status
	• Initially recovers from a SOFT or HARD problem state
 		i.e. returns to an OK state from WARNING or CRITICAL status. This is what you appear to be looking for.

Using the example event handler script on that page, you just need to look at the OK state and do something, not the CRITICAL state.

--
Marc


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
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