<br><br><div><span class="gmail_quote">On 8/14/06, <b class="gmail_sendername">Kelly Alexander</b> <<a href="mailto:kelly@skyrider.com">kelly@skyrider.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>        Hi, I'm running Nagios 2.5 and my question is: is there any way<br>to capture the stdout of an event handler and get it into the email<br>Nagios sends out?<br><br>        Right now I'm working with check_smtp and an event handler that
<br>runs via ssh and restarts sendmail on a system if it dies.  The check<br>and handler both work, and I get two email notices.  The first CRITICAL<br>when sendmail is found to be dead, and then a 2nd saying it's OK after
<br>the handler fires and restarts sendmail.<br><br>        What I wanted to see was the output of the handler included at<br>the end of the CRITICAL notice.  The sample handler scripts seem to<br>include output, but how can you see that other than in a log?
<br><br>        I thought about making the handler itself send email that it's<br>been run, but then I have to have every host able to send mail or ssh to<br>a host that can send mail.  That would work in this example since it's
<br>sendmail I'm working with but my "real" checks will not be for sendmail<br>nor on hosts that are email enabled nor that I want to have any sort of<br>ssh access back into my network.</blockquote><div><br><br>
does the -v flag to  check_smtp  do what you are asking? I am not 100% clear on your needs here.<br></div><br></div><br>