removing <!-- [flags:ordAstLe] > from custom email script
usa ims
usaims at yahoo.com
Wed Oct 1 17:19:03 CEST 2014
Hi,
My boss didn't like the subject line of the default email alerts and he asked me to change it.
I found a script online that does it -- so I modified the script and the subject line is doing what is expected but the body of the email is displaying some text that I would like not to be displayed.
How can I remove the " red [965282] red <!-- [flags:ordAstLe] >" or more importantly "<!-- [flags:ordAstLe] >"?
Here is the script:
#!/bin/bash
SM="/usr/sbin/sendmail"
DATE=`date +%Y%m%d-%H%M%S`
FROM="From: Xymon Server <xxxxxx at xxxxxx.com>"
TO="To:xxxxx at txxxxxx.com"
if [ "$RECOVERED" = "1" ]; then
RECOVERED="(Recovered)"
else
RECOVERED=""
fi
SUBJECT="Subject: D0 BIG BROTHER ALERT - $BBSVCNAME test on $BBHOSTNAME"
MSG="$FROM\n$TO\n$SUBJECT\n\n\n\n$BBALPHAMSG\n"
echo -e "$MSG" | $SM -t
#####################################################
On a 'conn' test, it is displaying:
xxxxxxx.corp.local:conn red [965282] red <!-- [flags:ordAstLe] --> Wed Oct 1 10:46:24 2014 conn NOT ok
Service conn on xxxxxxx.corp.local is not OK : Host does not respond to ping
System unreachable for 20 poll periods (5386 seconds)
&red 5.5.5.5 is unreachable
###################################################
Is there anyway to remove that? Thanks in advance.
usaims
More information about the Xymon
mailing list