[Xymon] How can i change the format for e-mail alert.

Tim McCloskey tm at freedom.com
Tue Mar 8 20:09:20 CET 2011


If you need html mail for some reason then this is probably no going to help, but it works fine for me.  This also removes the 'who are we paging' from the info pages.  I use SCRIPT and call an external file, some of the alerts are terse, others can contain more detail.  (I'm still on 4.2.0 :) 

Examples below.

alert config:
PAGE=%^example/(moo|foo) SERVICE=conn COLOR=red DURATION>2m
SCRIPT $alertdir/page-primary.sh page-web-prim FORMAT=sms REPEAT=15m

page-primary.sh
-----
#!/bin/bash

/bin/mail -s "$BBHOSTSVC" 1234567890 at somewheretmomail.net < /dev/null



-----
#!/bin/bash

/bin/mail -s "$BBHOSTSVC" gfoo at somewhere121323123.com <<EOM
$BBALPHAMSG
EOM

Regards, 

________________________________________
From: xymon-bounces at xymon.com [xymon-bounces at xymon.com] On Behalf Of Nordquist, Daniel [Daniel.Nordquist at orlandohealth.com]
Sent: Tuesday, March 08, 2011 10:50 AM
To: Jayanta Kundu; xymon at xymon.com
Subject: Re: [Xymon] How can i change the format for e-mail alert.

I’ve had the same issue with the cluster.exe sending alerts in html but not including the <html> tag so it shows up like yours does.  You can script it and have it send in html but it will attach a .bin file which is more of a pain than just reading between the tags imo.

Maybe someone else has a solution?


From: Jayanta Kundu [mailto:jayantak007 at gmail.com]
Sent: Tuesday, March 08, 2011 1:37 PM
To: Nordquist, Daniel
Subject: Re: [Xymon] How can i change the format for e-mail alert.

Hi Daniel,

I am using FORMAT=PLAIN in the "hobbit-alerts.cfg" file.

With Regards,
Jayanta.
On Tue, Mar 8, 2011 at 10:00 PM, Nordquist, Daniel <Daniel.Nordquist at orlandohealth.com<mailto:Daniel.Nordquist at orlandohealth.com>> wrote:
Have you tried using the format= setting?  Or are you using a script?


From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>] On Behalf Of Jayanta Kundu
Sent: Tuesday, March 08, 2011 1:23 PM
To: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: [Xymon] How can i change the format for e-mail alert.

Hi All,

How can I change the format for e-mail alert.

Presently in my xymon setup following e-mail format is showing:

red Tue Mar  8 13:17:28 IRST 2011 ERROR :The PERNDING_CREDIT_ENTRIES_WMX  count  crossed Error Threshold  Level



<br>

<font size=2 face=Arial color=yellow><b>PERNDING_CREDIT_ENTRIES_WMX  Details :</b></font><br> PENDING_CREDIT_ENTRIES VALUE

---------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

&red #ERROR#           1055 <br>

<font size=2 face=Arial>

<b>Threshold : </b>

Error Threshold > 500

Warning Threshold > 200



See http://192.168.xx.xx/xymon-cgi/bb-hostsvc.sh?HOST=t1vl001&SERVICE=Pernding_Credit_Entries_WMX





I would like to change it as follows(I wan following format for e-mail alert):
The PERNDING_CREDIT_ENTRIES_WMX  count = 1055

Error Threshold > 500
Warning Threshold > 200

See http://192.168.xx.xx/xymon-cgi/bb-hostsvc.sh?HOST=t1vl001&SERVICE=Pernding_Credit_Entries_WMX


With Regards,
Jayanta.

________________________________
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.

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: postmaster at orlandohealth.com<mailto:postmaster at orlandohealth.com> .

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.


________________________________
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.

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: postmaster at orlandohealth.com .

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.




More information about the Xymon mailing list