How to get stdout from event handlers into Nagios email messages?
Jim Richardson
weaselkeeper at gmail.com
Wed Aug 16 01:54:20 CEST 2006
On 8/14/06, Kelly Alexander <kelly at skyrider.com> wrote:
>
>
> 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.
does the -v flag to check_smtp do what you are asking? I am not 100% clear
on your needs here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060815/d528cb9b/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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