[Xymon] Email format

Jeremy Laidman jlaidman at rebel-it.com.au
Mon May 28 07:01:36 CEST 2012


Devmon embeds a bunch of HTML markup that doesn't work so well in a text
email.  The "PLAIN" format is the same as "TEXT" but simply omits the link
to the Xymon server - no clean-up will be done on HTML markup within the
status page, so any status with a table (pretty much anything from devmon)
will give you this problem.

You can use "SCRIPT /path/to/script RECIPIENT" and then do whatever
clean-up you wish inside the script.  Perhaps something like (untested):

#!/bin/sh
sed 's/<[^<]*>//g;s/^&//;/^Alarming on/d;/^$/d' | /usr/bin/mailx -s
"$BBALPHAMSG" $RCPT

See http://www.xymon.com/xymon/help/xymon-alerts.html#scripts for more
details on using scripts, including an example.

J


On Sat, May 26, 2012 at 7:12 AM, <kconnell at ryerson.ca> wrote:

> Not sure is this is a devmon question, or xymon, but figured I try here
> first.
>
> I have a table built/displayed on xymon via devmon for temperature on our
> L2 stacks.
>
> The issue is when a "red" event happens and an email is sent, the format
> of the email is just horrible.
>
> I've tried adding "FORMAT=PLAIN" within the alerts.cfg for that particular
> event, but I don't really see a change.
>
> Is there any way to make the email body a little nicer ??
>
> Below is an example of the email content:
>
> red Thu May 24 17:57:23 2012
>
>
>
> Alarming on
> (53.50,53.50,49.00,49.00,49.00,49.00,49.50,49.50,45.50,45.50,46.50)
> Alarming on (46.50,46.50,46.50)
> <table border=1 cellpadding=5>
> <tr><td>Unit Temperature</td></tr>
> <tr><td>&red 53.50</td></tr>
> <tr><td>&yellow 49.00</td></tr>
> <tr><td>&yellow 49.00</td></tr>
> <tr><td>&yellow 49.50</td></tr>
> <tr><td>&yellow 45.50</td></tr>
> <tr><td>&yellow 46.50</td></tr>
> <tr><td>&yellow 46.50</td></tr>
> </table>
>
>
> Operating temperature: 0° to 45°C (32° to 113°F)
>
>
> Ken Connell
> Intermediate Network Engineer
> Computer & Communication Services
> Ryerson University
> 350 Victoria St
> RM AB50
> Toronto, Ont
> M5B 2K3
> 416-979-5000 x6709
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120528/9fa29187/attachment.html>


More information about the Xymon mailing list