<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hari Sekhon wrote:
<blockquote cite="mid44ABCE2B.7030102@gmail.com" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Aaron Segura wrote:
<blockquote
cite="mid2D0245E43DEC724F81592D697F05689903AD5BC6@SIDHQEXCHMB1.Cabelas.Corp"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Is there a way to include the result of check_nagios in the
subject line
of an e-mail?</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal" style="text-align: justify;"><font color="navy"
face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">echo “” |
/bin/mail –s “`/usr/local/nagios/libexec/check_nagios
-F /usr/local/nagios/var/status.log -e 5 -C
/usr/local/nagios/bin/nagios`”
<a class="moz-txt-link-abbreviated" href="mailto:email@domain.com">email@domain.com</a><o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font
face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font
face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma;">
<a class="moz-txt-link-abbreviated"
href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a>
[<a class="moz-txt-link-freetext"
href="mailto:nagios-users-bounces@lists.sourceforge.net">mailto:nagios-users-bounces@lists.sourceforge.net</a>]
<b><span style="font-weight: bold;">On Behalf Of </span></b>Rimbert
Rivera<br>
<b><span style="font-weight: bold;">Sent:</span></b> Wednesday,
July
05, 2006
7:25 AM<br>
<b><span style="font-weight: bold;">To:</span></b>
<a class="moz-txt-link-abbreviated"
href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
<b><span style="font-weight: bold;">Subject:</span></b>
[Nagios-users] Is there a
way to include the result of check_nagiosin the subject line of an
e-mail?</span></font><o:p></o:p></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
<p><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">I
have a Cron job running every two hours that runs check_nagios and
e-mails us
the result. Here's the command I'm using:</span></font><o:p></o:p></p>
<p><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">/usr/local/nagios/libexec/check_nagios
-F /usr/local/nagios/var/status.log -e 5 -C
/usr/local/nagios/bin/nagios | mail
-s"Nagios Status check (heartbeat)" <a class="moz-txt-link-abbreviated"
href="mailto:email@domain.com">email@domain.com</a></span></font><o:p></o:p></p>
<p><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">The
command e-mails the check_nagios output as the e-mail body. Is there a
way to put it in the subject line instead? I cannot figure it out.
I don't think mail will let me do what I want. Is there something else
I
can use? I'm using RedHat 9.</span></font><o:p></o:p></p>
<p><font color="olive" face="Arial" size="3"><span
style="font-size: 12pt; font-family: Arial; color: olive;">- Rim</span></font>
<o:p></o:p></p>
<p><font color="olive" face="Arial" size="3"><span
style="font-size: 12pt; font-family: Arial; color: olive;">Rimbert
Rivera</span></font> <br>
<font color="olive" face="Arial"><span
style="font-family: Arial; color: olive;">Manager,
Information Technology</span></font> <br>
<font color="olive" face="Arial"><span
style="font-family: Arial; color: olive;">COMTEX
News Network</span></font> <br>
<font color="olive" face="Arial"><span
style="font-family: Arial; color: olive;"><a
class="moz-txt-link-abbreviated" href="mailto:rrivera@comtex.com">rrivera@comtex.com</a></span></font>
<br>
<font color="olive" face="Arial"><span
style="font-family: Arial; color: olive;">(703)
820-2000</span></font> <br>
<font color="olive" face="Arial"><span
style="font-family: Arial; color: olive;">Discover
more about COMTEX at: </span></font><a href="http://www.comtex.com/"><font
face="Arial"><span style="font-family: Arial;">http://www.comtex.com/</span></font></a>
<br>
<font color="olive" face="Arial"><span
style="font-family: Arial; color: olive;">This e-mail
is intended solely for the person or entity to which it is addressed
and may
contain confidential and/or privileged information. Any review,
dissemination,
copying, printing or other use of this e-mail by persons or entities
other than
the addressee is prohibited. If you have received this e-mail in error,
please
contact the sender immediately and delete the material from any
computer.</span></font><o:p></o:p></p>
</div>
<pre wrap=""><hr size="4" width="90%">
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
<a class="moz-txt-link-freetext"
href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</a></pre>
<pre wrap=""><hr size="4" width="90%">
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated"
href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext"
href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
a little harder to read but should work just as well.<br>
<br>
a small variation on the same theme:<br>
<br>
<font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">/bin/mail –s
“`/usr/local/nagios/libexec/check_nagios
-F /usr/local/nagios/var/status.log -e 5 -C
/usr/local/nagios/bin/nagios`”
<a class="moz-txt-link-abbreviated" href="mailto:email@domain.com">email@domain.com</a>
< /dev/null > /dev/null<br>
<br>
-h </span></font><br>
</blockquote>
<br>
</body>
</html>