How to get stdout from event handlers into Nagiosemail messages?

Steve Shipway s.shipway at auckland.ac.nz
Wed Aug 16 06:01:24 CEST 2006


> 	Hi, I'm running Nagios 2.5 and my question is: is there 
> any way to capture the stdout of an event handler and get it 
> into the email Nagios sends out?

If you think about it, this must be impossible.

Since the event handler is called at the same time as the notifications,
the output (if any) is not avaiable when the notifications are queued as
the event handler has not yet run.

The only way I can see to do this is to code an email sender into your
event handler script.

You could fudge it by creating a dummy service for the same host that
uses freshness to immediately reset to OK and has a count of 1, and then
have your event handler send a passive alert (containing the output
text) to this service.  The dummy service (which has the same contacts
as the main service) then sends out a separate alert to the contacts
with this information.  You could probably even create a generic
eventhandler wrapper script to do this.

Steve

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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