<HTML>
<HEAD>
<TITLE>Re: [xymon] Is setting high importance on alert emails possible?</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Maybe you are sending a recovered notice on Yellow instead of green?<BR>
<BR>
<BR>
On 12/22/10 9:24 AM, "Nordquist, Daniel" <<a href="Daniel.Nordquist@orlandohealth.com">Daniel.Nordquist@orlandohealth.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Can anyone tell me why this does not change the status on a “recovered” email?  It sends the recovered email and says the test is OK (up), but does not change the subject line.<BR>
 <BR>
 <BR>
#!/bin/bash<BR>
 <BR>
case $BBCOLORLEVEL in<BR>
<B>  green)<BR>
    STATUS="RECOVERED"<BR>
    ;;<BR>
</B>  red)<BR>
    STATUS="CRITICAL"<BR>
    ;;<BR>
  yellow)<BR>
    STATUS="WARNING"<BR>
    ;;<BR>
  purple)<BR>
    STATUS="stopped reporting"<BR>
    ;;<BR>
  *)<BR>
    STATUS="unknown status"<BR>
    ;;<BR>
esac<BR>
 <BR>
MESSAGE="To: $RCPT<BR>
Subject: $BBHOSTNAME $STATUS<BR>
Content-Type: text/plain<BR>
X-Priority: 1 (Highest)<BR>
X-MSMail-Priority: High<BR>
 <BR>
$BBALPHAMSG"<BR>
 <BR>
echo "$MESSAGE" | sendmail -t<BR>
exit 0<BR>
 <BR>
 <BR>
 <BR>
<BR>
</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><B>From:</B> Ralph Mitchell [<a href="mailto:ralphmitchell@gmail.com">mailto:ralphmitchell@gmail.com</a>] <BR>
<B>Sent:</B> Tuesday, December 21, 2010 3:49 PM<BR>
<B>To:</B> <a href="xymon@xymon.com">xymon@xymon.com</a><BR>
<B>Subject:</B> Re: [xymon] Is setting high importance on alert emails possible?<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
I haven't tested it, but something like this ought to do it:<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>#!/bin/bash<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>case $BBCOLORLEVEL in<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>  red)<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>    STATUS="CRITICAL"<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>    ;;<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>  yellow)<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>    STATUS="WARNING"<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>    ;;<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>  purple)<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>    STATUS="stopped reporting"<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>    ;;<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>  *)<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>    STATUS="unknown status"<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>    ;;<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>esac<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>MESSAGE="To: $RCPT<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>Subject: $BBHOSTNAME $STATUS<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>Content-Type: text/plain<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>X-Priority: 1 (Highest)<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>X-MSMail-Priority: High<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>$BBALPHAMSG"<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>echo "$MESSAGE" | sendmail -t<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>exit 0<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>Ralph Mitchell<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
 <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>On Tue, Dec 21, 2010 at 12:43 PM, Nordquist, Daniel <<a href="Daniel.Nordquist@orlandohealth.com">Daniel.Nordquist@orlandohealth.com</a>> wrote:<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><FONT COLOR="#1F497D"><FONT FACE="Times New Roman">Thank you!<BR>
 <BR>
I’m a noob at this so I’m not familiar with how to format a script.  Can you point me to a good page where I can see some examples?<BR>
 <BR>
 <BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
</FONT></SPAN><FONT SIZE="2"><FONT FACE="Times New Roman"><SPAN STYLE='font-size:10pt'><B>From:</B> Ralph Mitchell [<a href="mailto:ralphmitchell@gmail.com">mailto:ralphmitchell@gmail.com</a>] <BR>
<B>Sent:</B> Tuesday, December 21, 2010 11:46 AM<BR>
<B>To:</B> <a href="xymon@xymon.com">xymon@xymon.com</a><BR>
<B>Subject:</B> Re: [xymon] Is setting high importance on alert emails possible?<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
There's an email header that needs to be inserted.  Here's an example:<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>  <a href="http://techonthenet.com/unix/high_priority.php">http://techonthenet.com/unix/high_priority.php</a><BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>You'll need to change your alert config to use SCRIPT instead of MAIL, then write a script to pick up the relevant info from the environment variables listed in the xymon-alerts help page.  You don't need to write everything to a file, just use a big echo statement and pipe it through sendmail.  The blank line between the headers and the message body is important...  <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>Ralph Mitchell<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>On Tue, Dec 21, 2010 at 10:15 AM, Josh Luthman <<a href="josh@imaginenetworksllc.com">josh@imaginenetworksllc.com</a>> wrote:<BR>
I think if it's available with the command Henrik made it would have<BR>
been documented.  If not documented, I'd count on it not existing.<BR>
<BR>
What you'll probably need to do is call upon your own script to send<BR>
the email and you can change that with whatever mail command you use.<BR>
<BR>
Josh Luthman<BR>
Office: 937-552-2340<BR>
Direct: 937-552-2343<BR>
1100 Wayne St<BR>
Suite 1337<BR>
Troy, OH 45373<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><BR>
<BR>
<BR>
On Tue, Dec 21, 2010 at 10:11 AM, Nordquist, Daniel<BR>
<<a href="Daniel.Nordquist@orlandohealth.com">Daniel.Nordquist@orlandohealth.com</a>> wrote:<BR>
> Hey all, I doubt I can do this but maybe someone knows a trick…<BR>
><BR>
><BR>
><BR>
> I’d like to be able to send email alerts with a high importance flag based<BR>
> on the alert color and/or specific server or service that is down.<BR>
><BR>
><BR>
><BR>
> Is there any way to do this?  I’ve scoured the man pages but can’t find<BR>
> anything.<BR>
><BR>
><BR>
><BR>
> Thanks,<BR>
><BR>
> Dan<BR>
><BR>
><BR>
><BR>
> ________________________________<BR>
> This e-mail message and any attached files are confidential and are intended<BR>
> solely for the use of the addressee(s) named above. If you are not the<BR>
> intended recipient, any review, use, or distribution of this e-mail message<BR>
> and any attached files is strictly prohibited.<BR>
><BR>
> This communication may contain material protected by Federal privacy<BR>
> regulations, attorney-client work product, or other privileges. If you have<BR>
> received this confidential communication in error, please notify the sender<BR>
> immediately by reply e-mail message and permanently delete the original<BR>
> message. To reply to our email administrator directly, send an email to:<BR>
> <a href="postmaster@orlandohealth.com">postmaster@orlandohealth.com</a> .<BR>
><BR>
> If this e-mail message concerns a contract matter, be advised that no<BR>
> employee or agent is authorized to conclude any binding agreement on behalf<BR>
> of Orlando Health by e-mail without express written confirmation by an<BR>
> officer of the corporation. Any views or opinions presented in this e-mail<BR>
> are solely those of the author and do not necessarily represent those of<BR>
> Orlando Health.<BR>
><BR>
To unsubscribe from the xymon list, send an e-mail to<BR>
<a href="xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</a><BR>
 <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> 
</SPAN></FONT>
<P ALIGN=CENTER>
<FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><HR ALIGN=CENTER SIZE="2" WIDTH="100%"></SPAN></FONT>
<P>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN><FONT SIZE="1"><SPAN STYLE='font-size:7pt'>This e-mail message and any attached files are confidential and are intended solely for the use of the addressee(s) named above. If you are not the intended recipient, any review, use, or distribution of this e-mail message and any attached files is strictly prohibited.<BR>
<BR>
This communication may contain material protected by Federal privacy regulations, attorney-client work product, or other privileges. If you have received this confidential communication in error, please notify the sender immediately by reply e-mail message and permanently delete the original message. To reply to our email administrator directly, send an email to: <a href="postmaster@orlandohealth.com">postmaster@orlandohealth.com</a> .<BR>
<BR>
If this e-mail message concerns a contract matter, be advised that no employee or agent is authorized to conclude any binding agreement on behalf of Orlando Health by e-mail without express written confirmation by an officer of the corporation. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Orlando Health.<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="100%"></SPAN></FONT><FONT COLOR="#808080"><FONT SIZE="2"><FONT FACE="Arial"><SPAN STYLE='font-size:10pt'>This e-mail message and any attached files are confidential and are intended solely for the use of the addressee(s) named above. If you are not the intended recipient, any review, use, or distribution of this e-mail message and any attached files is strictly prohibited.<BR>
<BR>
This communication may contain material protected by Federal privacy regulations, attorney-client work product, or other privileges. If you have received this confidential communication in error, please notify the sender immediately by reply e-mail message and permanently delete the original message. To reply to our email administrator directly, send an email to: <a href="postmaster@orlandohealth.com">postmaster@orlandohealth.com</a> .<BR>
<BR>
If this e-mail message concerns a contract matter, be advised that no employee or agent is authorized to conclude any binding agreement on behalf of Orlando Health by e-mail without express written confirmation by an officer of the corporation. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Orlando Health.<BR>
</SPAN></FONT></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>