How to get stdout from event handlers into Nagios email messages?

Kelly Alexander kelly at skyrider.com
Tue Aug 15 01:52:02 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?

	Right now I'm working with check_smtp and an event handler that
runs via ssh and restarts sendmail on a system if it dies.  The check
and handler both work, and I get two email notices.  The first CRITICAL
when sendmail is found to be dead, and then a 2nd saying it's OK after
the handler fires and restarts sendmail.

	What I wanted to see was the output of the handler included at
the end of the CRITICAL notice.  The sample handler scripts seem to
include output, but how can you see that other than in a log?

	I thought about making the handler itself send email that it's
been run, but then I have to have every host able to send mail or ssh to
a host that can send mail.  That would work in this example since it's
sendmail I'm working with but my "real" checks will not be for sendmail
nor on hosts that are email enabled nor that I want to have any sort of
ssh access back into my network.

---
Kelly Alexander
Skyrider Corporation 

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