Alerts variables
Nordquist, Daniel
Daniel.Nordquist at orlandohealth.com
Fri Feb 11 18:33:39 CET 2011
I haven't tried this but I assume you could add the $bbcolorlevel "blue" to this script and add a status message of your choice to indicate it's been disabled?
I think your idea is a good one and I'm going to attempt to implement it on my system.
#!/bin/bash
if [ "$RECOVERED" -eq 1 ]; then
STATUS="RECOVERED"
else
case $BBCOLORLEVEL in
red)
STATUS="CRITICAL"
;;
yellow)
STATUS="WARNING"
;;
purple)
STATUS="stopped reporting"
;;
*)
STATUS="unknown status"
;;
esac
fi
MESSAGE="To: $RCPT
Subject: $BBHOSTNAME $STATUS
Content-Type: text/plain
X-Priority: 1 (Highest)
X-MSMail-Priority: High
$BBALPHAMSG"
echo "$MESSAGE" | sendmail -t
exit 0
From: Johan Sjöberg [mailto:johan.sjoberg at deltamanagement.se]
Sent: Thursday, February 10, 2011 5:26 AM
To: xymon at xymon.com
Subject: [xymon] Alerts variables
Hi.
I am trying to improve the html e-mail alert script a bit. I want the background to be blue if the cause of a recovery is a disable. Is there some variable sent to the alert script that indicates that a disable is the cause of a recovery, or do I have to create logic for this in the script, guessing based on the colors in the status message?
/Johan
________________________________
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20110211/91738a76/attachment.html>
More information about the Xymon
mailing list