No need for that level of complexity.<div>Scroll down a little further.</div><div>The following environment variables will be defined within your script.</div><div><b style="font-family: 'Times New Roman'; font-size: medium; ">BBALPHAMSG</b><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "> The full text of the status log triggering the alert</span></div>
<div>So all you need to do is </div><div>echo $BBALPHAMSG | grep "Bad message" && do_stuff</div><div><br></div><div>Hope it helps</div><div><br></div><div>Cheers</div><div>     Vernon</div><div><br><div class="gmail_quote">
On 17 November 2011 17:15, Neil Simmonds <span dir="ltr"><<a href="mailto:Neil.Simmonds@express-gifts.co.uk">Neil.Simmonds@express-gifts.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">





<u></u>
<u></u>
<u></u>
<u></u>
<u></u>





<div lang="EN-GB" link="blue" vlink="blue">

<div>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue">Hi <u></u><u></u>Vernon<u></u><u></u>,<u></u><u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue"><u></u> <u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue">I’ve looked at alerts.cfg and as far as I
can see that would only allow me to narrow it down to the service (i.e. I could
specify the msgs service on a specific host)<u></u><u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue"><u></u> <u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue">However that doesn’t allow me to narrow it
down to a specific message. I had thought of perhaps triggering a script that
way and then doing a grep through the last 500 lines of the log to see if I
find the message I’m interested in (I don’t expect it to come out too often).<u></u><u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue"><u></u> <u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue">As for whether a monitoring solution
should take remedial action, unfortunately we are currently using one that
shall remain nameless but let’s just say it’s one of the big 4 and we are
looking to replace all the functionality we are currently utilising from that
with Xymon. As that does remedial actions I have to try and find a way of doing
it in Xymon.<u></u><u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue"><u></u> <u></u></span></font></p>

<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue">Cheers,<u></u><u></u></span></font></p><div class="im">

<div>

<p><font size="2" color="blue" face="Segoe UI"><span style="font-size:10.0pt;font-family:"Segoe UI";color:blue">Neil Simmonds</span></font><font color="blue" face="Segoe UI"><span style="font-family:"Segoe UI";color:blue"> <br>

</span></font><font size="2" color="blue" face="Segoe UI"><span style="font-size:10.0pt;font-family:"Segoe UI";color:blue">Operations Analyst<br>
Operations Support Group</span></font><font color="blue" face="Segoe UI"><span style="font-family:"Segoe UI";color:blue"> <br>
</span></font><font size="2" color="blue" face="Segoe UI"><span style="font-size:10.0pt;font-family:"Segoe UI";color:blue">Express Gifts Ltd.</span></font><font color="blue" face="Segoe UI"><span style="font-family:"Segoe UI";color:blue"> <br>

</span></font><font size="2" color="blue" face="Segoe UI"><span style="font-size:10.0pt;font-family:"Segoe UI";color:blue"><a href="mailto:neil.simmonds@express-gifts.co.uk" target="_blank">neil.simmonds@express-gifts.co.uk</a></span></font><font color="blue" face="Segoe UI"><span style="font-family:"Segoe UI";color:blue"> </span></font><font color="blue"><span style="color:blue"><u></u><u></u></span></font></p>


<p><font size="1" color="blue" face="Segoe UI"><span style="font-size:7.5pt;font-family:"Segoe UI";color:blue">Tel :- 01254 303092</span></font><font color="blue" face="Segoe UI"><span style="font-family:"Segoe UI";color:blue"> <br>

</span></font><font size="1" color="blue" face="Segoe UI"><span style="font-size:7.5pt;font-family:"Segoe UI";color:blue">Fax :- 01254 303100</span></font><font color="blue" face="Segoe UI"><span style="font-family:"Segoe UI";color:blue"> </span></font><u></u><u></u></p>


</div>

</div><div>

<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma">
Vernon Everett [mailto:<a href="mailto:everett.vernon@gmail.com" target="_blank">everett.vernon@gmail.com</a>] <br>
<b><span style="font-weight:bold">Sent:</span></b> 17 November 2011 09:06<br>
<b><span style="font-weight:bold">To:</span></b> Neil Simmonds<br>
<b><span style="font-weight:bold">Cc:</span></b> Xymon Mailing List<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [Xymon] Automated
remedial actions</span></font><span lang="EN-US"><u></u><u></u></span></p>

</div><div><div class="h5">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Check the man page for Alerts.<u></u><u></u></span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Xymon can, as part of normal alerts, kick off a script, which, in
theory, could do almost anything you want.<u></u><u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Should a monitoring tool take remedial action or not?<u></u><u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">I leave that for you to decide. :-)<u></u><u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Regards<u></u><u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">     <u></u><u></u>Vernon<u></u><u></u><u></u><u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">On 17 November 2011 16:05, Neil Simmonds <<a href="mailto:Neil.Simmonds@express-gifts.co.uk" target="_blank">Neil.Simmonds@express-gifts.co.uk</a>>
wrote:<u></u><u></u></span></font></p>

<div link="blue" vlink="purple">

<div>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Hi all,</span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">I’ve got a
requirement to take a specific action on a unix server should we get a specific
message in a log file. </span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">I’m not sure
this is even possible in Xymon and I suspect I’ll have to try and work out some
way of doing it with a script. </span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Perhaps an
external script that will somehow check for the message, run the relevant
command to fix it and report a warning alert so that we know it has happened.</span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">If there is
some better way of doing it through Xymon I’d really like to know how.</span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font><u></u><u></u></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Thanks,</span></font><u></u><u></u></p>

<p><font size="2" face="Segoe UI"><span style="font-size:10.0pt;font-family:"Segoe UI"">Neil
Simmonds</span></font><font face="Segoe UI"><span style="font-family:"Segoe UI"">
<br>
</span></font><font size="2" face="Segoe UI"><span style="font-size:10.0pt;font-family:"Segoe UI"">Operations Analyst<br>
Operations Support Group</span></font><font face="Segoe UI"><span style="font-family:"Segoe UI""> <br>
</span></font><font size="2" face="Segoe UI"><span style="font-size:10.0pt;font-family:"Segoe UI"">Express Gifts Ltd.</span></font><font face="Segoe UI"><span style="font-family:"Segoe UI""> <br>
</span></font><font size="2" face="Segoe UI"><span style="font-size:10.0pt;font-family:"Segoe UI""><a href="mailto:neil.simmonds@express-gifts.co.uk" target="_blank">neil.simmonds@express-gifts.co.uk</a></span></font><font face="Segoe UI"><span style="font-family:"Segoe UI""> </span></font><u></u><u></u></p>


<p><font size="1" face="Segoe UI"><span style="font-size:7.5pt;font-family:"Segoe UI"">Tel
:- 01254 303092</span></font><font face="Segoe UI"><span style="font-family:"Segoe UI""> <br>
</span></font><font size="1" face="Segoe UI"><span style="font-size:7.5pt;font-family:"Segoe UI"">Fax :- 01254 303100</span></font><font face="Segoe UI"><span style="font-family:"Segoe UI""> </span></font><u></u><u></u></p>


<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> <u></u><u></u></span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
Name & Registered Office: EXPRESS GIFTS LIMITED, <u></u><u></u>2 GREGORY ST<u></u><u></u>, HYDE, <u></u><u></u>CHESHIRE<u></u>, <u></u>ENGLAND<u></u><u></u>,
SK14 4TH, Company No. 00718151.<br>
Express Gifts Limited is authorised and regulated by the Financial Services
Authority<br>
-------------<br>
NOTE: This email and any information contained within or attached in a separate
file is confidential and intended solely for the Individual to whom it is
addressed. The information or data included is solely for the purpose indicated
or previously agreed. Any information or data included with this e-mail remains
the property of Findel PLC and the recipient will refrain from utilising the
information for any purpose other than that indicated and upon request will
destroy the information and remove it from their records. Any views or opinions
presented are solely those of the author and do not necessarily represent those
of Findel PLC. If you are not the intended recipient, be advised that you have
received this email in error and that any use, dissemination, forwarding,
printing, or copying of this email is strictly prohibited. No warranties or
assurances are made in relation to the safety and content of this e-mail and
any attachments. No liability is accepted for any consequences arising from it.
Findel Plc reserves the right to monitor all e-mail communications through its
internal and external networks. If you have received this email in error please
notify our IT helpdesk on <a href="tel:%2B44%280%29%201254%20303030" value="+441254303030" target="_blank">+44(0) 1254 303030</a><u></u><u></u></span></font></p>

</div>

<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><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><u></u><u></u></span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
<br clear="all">
<u></u><u></u></span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>

</div>

<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">-- <br>
"While it is futile to try to eliminate risk, and questionable to try to
minimize it, it is essential that the risks taken be the right risks. "<br>
- Peter F. Drucker <u></u><u></u></span></font></p>

</div>

</div></div></div><div><div class="h5">

<br clear="both">
Name & Registered Office: EXPRESS GIFTS LIMITED, 2 GREGORY ST, HYDE, CHESHIRE, ENGLAND, SK14 4TH, Company No. 00718151.<br>
Express Gifts Limited is authorised and regulated by the Financial Services Authority<br>
 -------------<br>
NOTE:  This email and any information contained within or attached in a separate file is confidential and intended solely for the Individual to whom it is addressed. The information or data included is solely for the purpose indicated or previously agreed. Any information or data included with this e-mail remains the property of Findel PLC and the recipient will refrain from utilising the information for any purpose other than that indicated and upon request will destroy the information and remove it from their records.  Any views or opinions presented are solely those of the author and do not necessarily represent those of Findel PLC. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. No warranties or assurances are made in relation to the safety and content of this e-mail and any attachments.  No liability is accepted for any consequences arising from it. Findel Plc reserves the right to monitor all e-mail communications through its internal and external networks. If you have received this email in error please notify our IT helpdesk on <a href="tel:%2B44%280%29%201254%20303030" value="+441254303030" target="_blank">+44(0) 1254 303030</a><br>

</div></div></div>


<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>"While it is futile to try to eliminate risk, and questionable to try to minimize it, it is essential that the risks taken be the right risks. "<br>
- Peter F. Drucker <br><br>
</div>