I no longer do much work for that client, and haven't been on site for over a year, and have no idea when I will be there again.<br>However, from memory, it was really simple.<br>In hobbit-alerts.cfg (looks like it's been renamed to alerts.cfg in the new version) you do something like this<br>
<span style="font-family: courier new,monospace;">HOST=foo SERVICE=stuff COLOR=red</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">     SCRIPT=/my/script/location/mail_helpdesk.ksh</span><br>
<br>Check here for an example (commented out)<br><a href="http://www.xymon.com/xymon-cgi/viewconf.sh?alert">http://www.xymon.com/xymon-cgi/viewconf.sh?alert</a><br><br>Then your script, /my/script/location/mail_helpdesk.ksh<br>
will look something like this<br><span style="font-family: courier new,monospace;">#!/usr/bin/ksh</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">echo "</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Hi Helpdesk</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Please log a high call and assign it to the DBA team.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Their disks are on fire, and need to be doused with fine lager, </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">which they must deliver to the sysadmin team before COB.</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Thanks</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">     Sysadmin Team " | mailx <a href="mailto:helldesk@mycompany.com">helldesk@mycompany.com</a></span><br>
<br>Make it executable, and it should be a go.<br><br>You can also customise it a little.<br>For one, you can add command line variables, which you can define in the alerts file, and also, there are a lot of variable automagically defined for you by Xymon.<br>
(Check the alerts man page for more)<br><br>Try something like this.<br><span style="font-family: courier new,monospace;">HOST=foo SERVICE=stuff COLOR=red</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
     SCRIPT=/my/script/location/mail_generic.ksh <a href="mailto:helldesk@mycompany.com">helldesk@mycompany.com</a> DBA</span><br style="font-family: courier new,monospace;"><br><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#!/usr/bin/ksh</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">RECIPIENT=$1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">LOGGROUP=$2</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">CALL_LEVEL=medium</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[ "$BBCOLORLEVEL" = "RED" ] && CALL_LEVEL=high</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">echo "</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Hi $RECIPIENT</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Please log a $CALL_LEVEL call to $LOGGROUP, with the subject </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">\"$BBHOSTNAME - $BBSVCNAME problem - Please Investigate.\"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Please include this link in the service call ticket for more information</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$(echo $BBALPHAMSG | grep http)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Thanks</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    Monitoring.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">" | mailx $RECIPIENT</span><br style="font-family: courier new,monospace;"><br>
<br><br><br><br><br><div class="gmail_quote">On Tue, May 17, 2011 at 6:47 AM, FORD Alan <span dir="ltr"><<a href="mailto:Alan.FORD@stanwell.com">Alan.FORD@stanwell.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">






<div link="blue" vlink="purple" lang="EN-AU">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: blue;">I have written an email script which displays as html (of course you have to have a html enabled  email client).</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: blue;">It checks for individual services and displays a fixed message, could also add checks for specific hosts to.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: blue;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: blue;">Here is a sample (not sure if html will display properly thru here)</span></p>
<h2><span style="background: none repeat scroll 0% 0% red;">Xymon Alert (red) : files <a href="http://utnfrc01.stanwell.com" target="_blank">utnfrc01.stanwell.com</a></span><span></span></h2>
<p class="MsoNormal"><span style="font-size: 10pt;"><br>
Files on server <b><a href="http://testserver.stanwell.com" target="_blank">testserver.stanwell.com</a></b> have not been updated recently <br>
<br>
testserver.stanwell.com:files red [124238]<br>
red Files status at Tue May 17 04:05:58 EST 2011<br>
<br>
<img src="cid:image002.png@01CC146F.1B8A8510" alt="red" height="16" width="16"><a href="http://xymon-cgi/bb-hostsvc.sh?CLIENT=utnfrc01.stanwell.com&SECTION=file:/stanwell/data/mms/loader/Reports/STANWELL_P5MIN_201105170410_20110517040540.zip" target="_blank">/stanwell/data/mms/loader/Reports/STANWELL_P5MIN_201105170410_20110517040540.zip</a><br>

File is missing<br>
File is missing<br>
<br>
<br>
<img src="cid:image004.png@01CC146F.1B8A8510" alt="yellow" height="16" width="16" border="0"><a href="http://xymon-cgi/bb-hostsvc.sh?CLIENT=utnfrc01.stanwell.com&SECTION=file:/stanwell/data/scada/sps/incoming/unit2/MTBIN.DAT" target="_blank">/stanwell/data/scada/sps/incoming/unit2/MTBIN.DAT</a><br>

File is missing<br>
<br>
<br>
<img src="cid:image005.gif@01CC146E.C984BF60" alt="green" height="16" width="16" border="0"><a href="http://xymon-cgi/bb-hostsvc.sh?CLIENT=utnfrc01.stanwell.com&SECTION=file:/stanwell/data/mms/batcher/Holding" target="_blank">/stanwell/data/mms/batcher/Holding</a><br>

<br>
<br>
</span><span style="font-size: 11pt; color: blue;"></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: blue;"> </span></p>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:xymon-bounces@xymon.com" target="_blank">xymon-bounces@xymon.com</a> [mailto:<a href="mailto:xymon-bounces@xymon.com" target="_blank">xymon-bounces@xymon.com</a>]
<b>On Behalf Of </b>Vernon Everett<br>
<b>Sent:</b> Monday, 16 May 2011 9:21 PM<br>
<b>To:</b> sonal kumar<br>
<b>Cc:</b> Xymon mailinglist<br>
<b>Subject:</b> Re: [Xymon] customize the email body alerts for xymon</span></p>
</div><div class="im">
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom: 12pt;">Use the script option in the alerts file.<br>
At a previous client, we had a very specific problem we were monitoring for.<br>
Instead of Xymon sending a standard alert email, I needed a set of detailed instructions sent out, indicating how to resolve the issue.<br>
I then created a script to send the custom email, instead.<br>
It worked so well, the client asked me to use the technique for a number of other problem areas.<br>
Most popular use was to send instructions to helpdesk, explaining who to log the call to, and the severity level.<br>
<br>
Regards<br>
     Vernon<br>
<br>
<br>
</p>
</div><div><div class="im">
<p class="MsoNormal">On Mon, May 16, 2011 at 6:10 PM, sonal kumar <<a href="mailto:nc.sonal@gmail.com" target="_blank">nc.sonal@gmail.com</a>> wrote:</p>
<p class="MsoNormal">Hi team,</p>
<div>
<p class="MsoNormal"> </p>
</div>
</div><div><div class="im">
<p class="MsoNormal">Please suggest if there is any possibility to modify the body of the email alert as below as my client needs such format.</p>
</div><div>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt;"> </p>
<div><div class="im">
<p class="MsoNormal">On Fri, May 13, 2011 at 7:42 PM, sonal kumar <<a href="mailto:nc.sonal@gmail.com" target="_blank">nc.sonal@gmail.com</a>> wrote:</p>
</div><div>
<div>
<div>
<blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;">
<div class="im">
<p class="MsoNormal">Hi Gatis,</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Thanks for providing the scipt ,after applying it ,we are getting blank mails as below</p>
</div>
</div><div>
<div>
<div>
<div>
<div>
<div>
<div style="border-width: 1pt; border-style: solid; border-color: rgb(239, 239, 239) rgb(239, 239, 239) rgb(226, 226, 226); padding: 0cm; margin-bottom: 7.5pt; float: left;">
<div style="border: 1pt solid rgb(188, 188, 188); padding: 2pt 0cm 0cm;">
<div>
<div>
<div>
<div>
<div><div class="im">
<p class="MsoNormal" style="background: none repeat scroll 0% 0% white;"><span style="font-size: 13.5pt; color: black;"> </span></p>
<div>
<div>
<h1 style="margin-right: 3.75pt; margin-bottom: 3.75pt; margin-left: 7.5pt; border-right: inherit;">
<span style="font-size: 12pt; color: black;">sapsrp disk - red 718518</span></h1>
<table style="margin-left: 7.5pt; border-collapse: collapse; display: inline-table;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
<td style="background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm; min-height: 1px;"></td>
<td style="width: 0.75pt; background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm; min-height: 1px;" width="1">
</td>
<td style="background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm; min-height: 1px;"></td>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
</tr>
<tr>
<td style="width: 0.75pt; background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm 0cm 0.75pt;" width="1"></td>
<td style="background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm 0cm 0.75pt;">
<div name="XYMON">
<p class="MsoNormal"><span style="color: rgb(0, 102, 51);">XYMON</span></p>
</div>
</td>
<td style="width: 0.75pt; background: none repeat scroll 0% 0% rgb(0, 102, 51); padding: 0cm 0cm 0.75pt;" width="1"></td>
<td style="background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm 0cm 0.75pt;">
<p class="MsoNormal"><span style="color: rgb(0, 102, 51);">X</span></p>
</td>
<td style="width: 0.75pt; background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm 0cm 0.75pt;" width="1"></td>
</tr>
<tr>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
<td style="background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm; min-height: 1px;"></td>
<td style="width: 0.75pt; background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm; min-height: 1px;" width="1">
</td>
<td style="background: none repeat scroll 0% 0% rgb(241, 245, 236); padding: 0cm; min-height: 1px;"></td>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div><div>
<div>
<div>
<div>
<div>
<div style="border-width: 1pt; border-style: solid; border-color: rgb(239, 239, 239) rgb(239, 239, 239) rgb(226, 226, 226); padding: 0cm; margin-bottom: 7.5pt; float: left;">
<div style="border: 1pt solid rgb(188, 188, 188); padding: 2pt 0cm 0cm;">
<div>
<div>
<div style="border-color: rgb(204, 204, 204) rgb(187, 187, 187) rgb(160, 160, 160); border-style: solid; border-width: 1pt; padding: 2pt 6pt; margin-left: 1.5pt; margin-bottom: 1.5pt; display: inline-block; outline-style: none; min-height: 1.3em;">

<p class="MsoNormal" style="text-align: center; background: none repeat scroll 0% 0% white; vertical-align: middle;" align="center">
<b><span style="font-size: 13.5pt; color: black;" lang="EN-US">Error! Filename not specified.</span></b><span style="font-size: 13.5pt; color: rgb(0, 101, 204);">Reply</span><span style="font-size: 13.5pt; color: black;"></span></p>

</div>
</div>
<div>
<div style="border-width: 1pt medium 1pt 1pt; border-style: solid none solid solid; border-color: rgb(204, 204, 204) -moz-use-text-color rgb(160, 160, 160) rgb(187, 187, 187); padding: 2pt 0cm 2pt 6pt; margin-left: 1.5pt; margin-bottom: 1.5pt; display: inline-block; outline-style: none; min-height: 1.3em;">

<p class="MsoNormal" style="text-align: center; background: none repeat scroll 0% 0% white; vertical-align: middle;" align="center">
<b><span style="font-size: 13.5pt; color: black;" lang="EN-US">Error! Filename not specified.</span></b><span style="font-size: 13.5pt; color: black;"></span></p>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<table style="width: 0cm; border-collapse: collapse;" width="0" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 378pt; padding: 0cm;" nowrap valign="top" width="504">
<table style="width: 378pt; border-collapse: collapse;" width="504" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 0.3pt; padding: 0cm 3pt 0cm 0cm;" valign="top" width="0">
<p class="MsoNormal"><b><span lang="EN-US">Error! Filename not specified.</span></b><span></span></p>
</td>
<td style="width: 0.3pt; padding: 0cm;" nowrap valign="top" width="0">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: rgb(53, 28, 117);">from</span></p>
</td>
<td style="width: 345pt; padding: 0cm;" valign="top" width="460">
<p class="MsoNormal"><b><span lang="EN-US">Error! Filename not specified.</span></b><b><span style="font-size: 10pt; color: rgb(0, 104, 28);"><a href="mailto:xymon@sapsrp.sasrv.biz" target="_blank">xymon@sapsrp.sasrv.biz</a></span></b><span></span></p>

</td>
</tr>
<tr>
<td colspan="2" style="width: 0.3pt; padding: 0cm;" nowrap valign="top" width="0">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: rgb(53, 28, 117);">to</span></p>
</td>
<td style="width: 345pt; padding: 0cm;" valign="top" width="460">
<p class="MsoNormal"><b><span lang="EN-US">Error! Filename not specified.</span></b><span><a href="mailto:nc.sonal@gmail.com" target="_blank">nc.sonal@gmail.com</a></span></p>
</td>
</tr>
<tr>
<td colspan="2" style="width: 0.3pt; padding: 0cm;" nowrap valign="top" width="0">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: rgb(53, 28, 117);">date</span></p>
</td>
<td style="width: 345pt; padding: 0cm;" valign="top" width="460">
<p class="MsoNormal"><b><span lang="EN-US">Error! Filename not specified.</span></b><span>Fri, May 13, 2011 at 6:47 PM</span></p>
</td>
</tr>
<tr>
<td colspan="2" style="width: 0.3pt; padding: 0cm;" nowrap valign="top" width="0">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="color: rgb(53, 28, 117);">subject</span></p>
</td>
<td style="width: 345pt; padding: 0cm;" valign="top" width="460">
<p class="MsoNormal"><b><span lang="EN-US">Error! Filename not specified.</span></b><span>sapsrp disk - red 718518</span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<table style="width: 0cm; border-collapse: collapse;" width="0" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 378pt; padding: 0cm;" nowrap valign="top" width="504">
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div><div class="im">
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">So just one more favour,as i am not good at scripting.</p>
</div>
<div>
<p class="MsoNormal">We need the mail to be some thing line below. with the body displaying alert and and TEXT having some presentable format with possible action items.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
</div><div><div class="im">
<div>
<div>
<h1 style="margin-right: 3.75pt; margin-bottom: 3.75pt; margin-left: 7.5pt; background: inherit; border-right: inherit;">
<span style="font-size: 12pt; background: none repeat scroll 0% 0% rgb(255, 255, 102);">sapsrp disk </filesystem name> - red 718518</span></h1>
<table style="margin-left: 7.5pt; border-collapse: collapse; display: inline-table;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
<td style="padding: 0cm; min-height: 1px;"></td>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
<td style="padding: 0cm; min-height: 1px;"></td>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
</tr>
<tr>
<td style="width: 0.75pt; padding: 0cm 0cm 0.75pt;" width="1"></td>
<td style="padding: 0cm 0cm 0.75pt;">
<div name="XYMON">
<p class="MsoNormal"><span>XYMON</span></p>
</div>
</td>
<td style="width: 0.75pt; padding: 0cm 0cm 0.75pt;" width="1"></td>
<td style="padding: 0cm 0cm 0.75pt;">
<p class="MsoNormal"><span>X</span></p>
</td>
<td style="width: 0.75pt; padding: 0cm 0cm 0.75pt;" width="1"></td>
</tr>
<tr>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
<td style="padding: 0cm; min-height: 1px;"></td>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
<td style="padding: 0cm; min-height: 1px;"></td>
<td style="width: 0.75pt; padding: 0cm; min-height: 1px;" width="1"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div><div>
<div>
<div>
<div>
<div>
<div style="border-width: 1pt; border-style: solid; border-color: rgb(239, 239, 239) rgb(239, 239, 239) rgb(226, 226, 226); padding: 0cm; margin-bottom: 7.5pt; float: left;">
<div style="border: 1pt solid rgb(188, 188, 188); padding: 2pt 0cm 0cm;">
<div>
<div>
<div style="border-color: rgb(204, 204, 204) rgb(187, 187, 187) rgb(160, 160, 160); border-style: solid; border-width: 1pt; padding: 2pt 6pt; margin-left: 1.5pt; margin-bottom: 1.5pt; display: inline-block; outline-style: none; min-height: 1.3em;">

<p class="MsoNormal" style="text-align: center; background: none repeat scroll 0% 0% rgb(255, 255, 102); vertical-align: middle;" align="center">
<b><span style="font-size: 13.5pt;" lang="EN-US">Error! Filename not specified.</span></b><span style="font-size: 13.5pt;">Reply</span></p>
</div>
</div>
<div>
<div style="border-width: 1pt medium 1pt 1pt; border-style: solid none solid solid; border-color: rgb(204, 204, 204) -moz-use-text-color rgb(160, 160, 160) rgb(187, 187, 187); padding: 2pt 0cm 2pt 6pt; margin-left: 1.5pt; margin-bottom: 1.5pt; display: inline-block; outline-style: none; min-height: 1.3em;">

<p class="MsoNormal" style="text-align: center; background: none repeat scroll 0% 0% rgb(255, 255, 102); vertical-align: middle;" align="center">
<b><span style="font-size: 13.5pt;" lang="EN-US">Error! Filename not specified.</span></b><span style="font-size: 13.5pt;"></span></p>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<table style="width: 0cm; border-collapse: collapse;" width="0" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 378pt; padding: 0cm;" nowrap valign="top" width="504">
<table style="width: 378pt; border-collapse: collapse;" width="504" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 0.3pt; padding: 0cm 3pt 0cm 0cm;" valign="top" width="0">
<p class="MsoNormal"><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);" lang="EN-US">Error! Filename not specified.</span></b><span></span></p>
</td>
<td style="width: 0.3pt; padding: 0cm;" nowrap valign="top" width="0">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);">from</span><span></span></p>
</td>
<td style="width: 345pt; padding: 0cm;" valign="top" width="460">
<p class="MsoNormal"><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);" lang="EN-US">Error! Filename not specified.</span></b><b><span style="font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 153);"><a href="mailto:xymon@sapsrp.sasrv.biz" target="_blank">xymon@sapsrp.sasrv.biz</a></span></b><span></span></p>

</td>
</tr>
<tr>
<td colspan="2" style="width: 0.3pt; padding: 0cm;" nowrap valign="top" width="0">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);">to</span><span></span></p>
</td>
<td style="width: 345pt; padding: 0cm;" valign="top" width="460">
<p class="MsoNormal"><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);" lang="EN-US">Error! Filename not specified.</span></b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);"><a href="mailto:nc.sonal@gmail.com" target="_blank">nc.sonal@gmail.com</a></span><span></span></p>

</td>
</tr>
<tr>
<td colspan="2" style="width: 0.3pt; padding: 0cm;" nowrap valign="top" width="0">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);">date</span><span></span></p>
</td>
<td style="width: 345pt; padding: 0cm;" valign="top" width="460">
<p class="MsoNormal"><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);" lang="EN-US">Error! Filename not specified.</span></b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);">Fri, May 13, 2011 at 6:47 PM</span><span></span></p>

</td>
</tr>
<tr>
<td colspan="2" style="width: 0.3pt; padding: 0cm;" nowrap valign="top" width="0">
<p class="MsoNormal" style="text-align: right;" align="right"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);">subject</span><span></span></p>
</td>
<td style="width: 345pt; padding: 0cm;" valign="top" width="460">
<p class="MsoNormal"><b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);" lang="EN-US">Error! Filename not specified.</span></b><span style="background: none repeat scroll 0% 0% rgb(255, 255, 153);">sapsrp disk - red 718518</span><span></span></p>

</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div><div><div></div><div class="h5">
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 102);">Hi team,</span></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 102);">Please look at the below alert for system <hostname> and take the action.</span></p>
</div>
<div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 102);">red Thu May 12 15:59:21 WST 2011 - Filesystems NOT ok<br>
&red /var (98% used) has reached the PANIC level (90%)</span></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="background: none repeat scroll 0% 0% rgb(255, 255, 102);">Action: Remove the irrelevant files from </filesystem> </span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">On Fri, May 13, 2011 at 2:06 AM, Gatis A. <<a href="mailto:gatis.anee@gmail.com" target="_blank">gatis.anee@gmail.com</a>> wrote:</p>
<p class="MsoNormal" style="margin-bottom: 12pt;">Hi,<br>
<br>
Quick and dirty solution to get &red lines to be sent out only (tested with xymon 4.2.2)<br>
Basicly $BBALPHAMSG variable is the key here!<br>
<br>
<br>
<br>
hobbit-alerts.cfg:<br>
#-----------------------------------------------------<br>
GROUP=TESTGROUP<br>
        SCRIPT /path/to/custom_alerts.sh <a href="mailto:test@test.com" target="_blank">
test@test.com</a><br>
#-----------------------------------------------------<br>
<br>
<br>
custom_alerts.sh:<br>
#-----------------------------------------------------<br>
#!/bin/bash<br>
<br>
BBALPHAMSG=`echo "$BBALPHAMSG" | /path/to/<a href="http://custom_grep.pl" target="_blank">custom_grep.pl</a>`;export BBALPHAMSG<br>
<br>
if [ $RECOVERED -eq 1 ] <br>
        then<br>
        RECOVERED="recovered"<br>
        else<br>
        RECOVERED=""<br>
fi<br>
<br>
echo "${BBALPHAMSG:0:300}" | mail -s "$BBHOSTNAME $BBSVCNAME - $BBCOLORLEVEL $ACKCODE $RECOVERED $DOWNSECSMSG" $RCPT<br>
exit 0<br>
#-----------------------------------------------------<br>
<br>
<br>
<a href="http://custom_grep.pl" target="_blank">custom_grep.pl</a>:<br>
#-----------------------------------------------------<br>
#!/usr/bin/perl<br>
<br>
# searching for lines which has "&red"<br>
<br>
while (<>) {<br>
<br>
@maches=/&red .*\s/ig; <br>
<br>
foreach $_ (@maches) {<br>
        s/<.*?>//ig; # removing all the html tags<br>
        print "$_ ";<br>
        }<br>
<br>
}<br>
#-----------------------------------------------------<br>
<br>
<br>
</p>
<div>
<div>
<div>
<p class="MsoNormal">On Thu, May 12, 2011 at 3:31 PM, sonal kumar <<a href="mailto:nc.sonal@gmail.com" target="_blank">nc.sonal@gmail.com</a>> wrote:</p>
</div>
</div>
<blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;">

<div>
<div>
<p class="MsoNormal"><span>Hi team,</span></p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"><span>I need to customize the email body and pattern for the alerts receiving from xymon.</span></p>
</div>
<div>
<p class="MsoNormal"><span>As in the below alert mail for disk ,</span></p>
</div>
<div>
<ul type="disc">
<li class="MsoNormal">
<span>we need the mail to display only the filesystem which is critical in individual mails and avoid displaying the the entire list of filesystems.</span></li><li class="MsoNormal">
<span>We need to customise the body of the mail and add some meaningful text unique for each alert,let me know if any sample script can be used for it.</span></li><li class="MsoNormal">
<span>in below mail /oracle/SRP/sapdata0 alert is shown in KB UNITS, can this be changed to show MB units free</span></li></ul>
<p class="MsoNormal">Please suggest.thanks in advance</p>
</div>
<div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">---------- Forwarded message ----------<br>
From: <<a href="mailto:xymon@sapsrp.sasrv.biz" target="_blank">xymon@sapsrp.sasrv.biz</a>><br>
Date: Thu, May 12, 2011 at 5:31 PM<br>
Subject: Xymon [313335] sapsrp:disk CRITICAL (RED)<br>
To: <a href="mailto:nc.sonal@gmail.com" target="_blank">nc.sonal@gmail.com</a><br>
<br>
<br>
red Thu May 12 15:59:21 WST 2011 - Filesystems NOT ok<br>
&red /var (98% used) has reached the PANIC level (90%)<br>
&yellow /tempsp (96% used) has reached the WARNING level (95%)<br>
&yellow /usr/sap (81% used) has reached the WARNING level (70%)<br>
&yellow /oracle/SRP/saparch (77% used) has reached the WARNING level (75%)<br>
&yellow /oracle/SRP/sapdata0 (3013196 units free) has reached the WARNING level (3013199 units)<br>
<br>
Filesystem    1024-blocks      Used      Free %Used Mounted on<br>
/dev/hd4          1048576    473192    575384   46% /<br>
/dev/hd2         10485760   4792084   5693676   46% /usr<br>
/dev/hd9var        524288    513520     10768   98% /var<br>
/dev/hd3          1572864    950588    622276   61% /tmp<br>
/dev/hd1           262144       968    261176    1% /home<br>
/proc                   -         -         -    -  /proc<br>
/dev/hd10opt      1179648    478100    701548   41% /opt<br>
/dev/lvsrporacle      212992    103972    109020   49% /oracle<br>
/dev/lvsrp_client      409600    264280    145320   65% /oracle/client<br>
/dev/lvsrp_srp     1359872    262204   1097668   20% /oracle/SRP<br>
/dev/fslv01       5242880   5006128    236752   96% /tempsp<br>
/dev/lvsrpmira      720896    410056    310840   57% /oracle/SRP/mirrlogA<br>
/dev/lvsrpmirb      720896    410056    310840   57% /oracle/SRP/mirrlogB<br>
/dev/lvsrporia      720896    426576    294320   60% /oracle/SRP/origlogA<br>
/dev/lvsrporib      720896    410056    310840   57% /oracle/SRP/origlogB<br>
/dev/lvsrp_sapreorg      565248     33572    531676    6% /oracle/SRP/sapreorg<br>
/dev/lvsrp_sapmnt     4194304   2273984   1920320   55% /sapmnt/SRP<br>
/dev/lvsrp_usr_sap     7856128   6303556   1552572   81% /usr/sap<br>
/dev/lvsrp_102     8183808   5288020   2895788   65% /oracle/SRP/102_64<br>
/dev/lvsrparch    10240000   7882476   2357524   77% /oracle/SRP/saparch<br>
/dev/lvsrpdata0   185073664 182060468   3013196   99% /oracle/SRP/sapdata0<br>
<br>
See <a href="http://sapsrp/xymon-cgi/svcstatus.sh?HOST=sapsrp&SERVICE=disk" target="_blank">
http://sapsrp/xymon-cgi/svcstatus.sh?HOST=sapsrp&SERVICE=disk</a></p>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
<br clear="all">
<br>
-- <br>
Thanks & Regards<br>
Sonal kumar N C</p>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;">_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a></p>
</blockquote>
</div>
<p class="MsoNormal"> </p>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
<br clear="all">
<br>
-- <br>
Thanks & Regards<br>
Sonal kumar N C</p>
</div>
</div>
</div></div></div>
</blockquote>
</div><div><div></div><div class="h5">
<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
<br clear="all">
<br>
-- <br>
Thanks & Regards<br>
Sonal kumar N C</p>
</div></div></div>
</div>
</div><div><div></div><div class="h5">
<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
<br clear="all">
<br>
-- <br>
Thanks & Regards<br>
Sonal kumar N C</p>
</div></div></div>
</div>
</div><div><div></div><div class="h5">
<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a></p>
</div></div></div>
<p class="MsoNormal"> </p>
</div>
<pre>________________________________________________________________________________

This email (including all attachments) may contain personal information and is intended solely for the named addressee. It is confidential and may be subject to legal or other professional privilege and any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake.  This email is also subject to copyright.  No part of it should be reproduced, adapted or communicated without the written consent of the copyright owner. Any personal Information in this email must be handled in accordance with the Privacy Act 1988 (Cth).  If you have received it in error, please let Stanwell Corporation Limited know by reply email, delete it from your system and destroy any copies.  Stanwell is not responsible for any changes made to a document other than those made by Stanwell.  Stanwell accepts no liability for any damage caused by this email or its attachments due to viruses, interference, interception, corruption or unauthorised access.   If  you have any doubts about the authenticity of an email purportedly sent by us, please contact us immediately.  If this is a commercial electronic message within the meaning of the Spam Act 2003 (Cth), you may indicate that you do not wish to receive any further commercial electronic messages from Stanwell by emailing mailto:<a href="mailto:privacy@stanwell.com." target="_blank">privacy@stanwell.com.</a>..
________________________________________________________________________________
</pre></div>

</blockquote></div><br>