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, <user-7cb0f5662626@xymon.invalid> 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
XXX Victoria St
RM AB50
Toronto, Ont
M5B 2K3
XXX-XXX-XXXX x6709