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

Mark Eisenblaetter mark.eisenblaetter at gmail.com
Tue Aug 15 11:14:07 CEST 2006


Hi,

you can save the outut in a file an write a script that search the
file for new output.
Start this script before sending the mail an if there is new output
for the special service appent it to the message.

Mark

On 8/15/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.
>
> ---
> 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
>


-- 
Mark Eisenblätter
Geissendoerfer & Leschinsky GmnH
www.gl-sytem-haus.de

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