<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText"><a name="_MailEndCompose">I do it with a custom script. It took me a while to get it exactly right but I love how clean my alerts look now.<o:p></o:p></a></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I created a script that pulls whatever data in that I want to send in the email. You can add any of the fields in the
<a href="http://xymon.sourceforge.net/xymon/help/manpages/man5/alerts.cfg.5.html">
alerts.cfg</a> man page. (Side note, unless you’re looking at CONN, so far the IP address isn’t listed in the variable $BBALPHAMSG for the hosts I’m monitoring)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">#!/bin/sh<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">n=$RECOVERED<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">if test $n -eq 0<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">then<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><font color=#01396f size="6">Xymon Monitoring System</font><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">Here are the details of your problem:<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><pre><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">___________________________________________________________________________________<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">$BBALPHAMSG<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">___________________________________________________________________________________<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"></pre><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">Please log onto $BBHOSTNAME and check the $BBSVCNAME." | mail -a "Content-type: text/html;" -s "ALERT: $BBHOSTSVC is $BBCOLORLEVEL" --append=FROM:"Zymon Monitoring System <alert@company.com>" $RCPT<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">else<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><font color=#01396f size="6">Xymon Monitoring System</font><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">It looks like $BBHOSTNAME has recovered.<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><pre><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">___________________________________________________________________________________<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">$BBALPHAMSG<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">__________________________________________________________________________________<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"></pre><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in"><br /><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">$BBSVCNAME on $BBHOSTNAME has recovered." | mail -a "Content-type: text/html;" -s "NOTE:$BBSVCNAME on $BBHOSTNAME recovered" --append=FROM:"Xymon Monitoring System <alert@company.com>" $RCPT<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in">fi<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Then in your <a href="http://xymon.sourceforge.net/xymon/help/manpages/man5/alerts.cfg.5.html">
alerts file</a>, change the second line to look like this instead of the default:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">PAGE=%.*servername*<o:p></o:p></p>
<p class="MsoPlainText">    SCRIPT=/location/to/custom-alerts/alert.sh user@company.com RECOVERED REPEAT=1440 DURATION>3<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Hope that helps!<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">John Tullis<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<br>
From: William Sanders [mailto:lts1809@yahoo.com] <br>
Sent: Monday, May 04, 2015 8:54 AM<br>
To: xymon@xymon.com<br>
Subject: change alert email text?</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I'm wondering if there is a quick answer on how to change the email alert text that Xymon generates.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Specifically it is required that I remove the IP address from the email.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Example: <o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">---<o:p></o:p></p>
<p class="MsoPlainText">red  Fri Apr  3 17:54:18 2015 conn NOT ok<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Service conn on 4ai1gub4x9 is not OK : Host does not respond to ping<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">System unreachable for 223 poll periods (7274 seconds)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">&red 10.0.0.10 is unreachable<o:p></o:p></p>
<p class="MsoPlainText">---<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">would become:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">---<o:p></o:p></p>
<p class="MsoPlainText">red  Fri Apr  3 17:54:18 2015 conn NOT ok<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Service conn on 4ai1gub4x9 is not OK : Host does not respond to ping<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">System unreachable for 223 poll periods (7274 seconds)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">&red 4ai1gub4x9 is unreachable<o:p></o:p></p>
<p class="MsoPlainText">---<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I can list the IPs in the hosts.cfg (will have to actually, since no DNS server is available), but before I'll be allowed to submit Xymon to our security office for testing/approval to be added to our network management has tasked me
 with removing the IPs from the emails.<o:p></o:p></p>
</div>
</body>
</html>