I use this script:
#!/bin/sh
Author: Gary Baluha
Created On: 3-16-2006
Description: Adds a searchable subject string to SMS-formatted messages
to allow client-side filtering of possible duplicate alerts.
NOTES: BBHOSTSVC = The host affected, and the name of the alert
BBALPHAMSG = The full alert message (same as
BBHOSTSVC [ACKCODE] if FORMAT=SMS)
ACKCODE = The ack code for the alert
BBCOLORLEVEL = The color of the alert (red, yellow, etc)
REVISION HISTORY:
=================
Ver. Date Author Notes
---- ---- ------ -----
v1.0 3-16-2006 GMB Initial creation
v2.0 2-13-2007 GMB Page alert now shows what is red/yellow, in
addition to the name of the alert
VARIABLES:
msg=echo "${BBALPHAMSG}" | egrep "&yellow|&red"
msg="\n${msg}"
CODE:
#======= subject="!HB ${ACKCODE}" alert="${BBHOSTSVC} ${BBCOLORLEVEL}" message="\n${alert}${msg}"
echo -e "${message}" | mail -s "${subject}" $RCPT
Frank M. Ramaekers Jr. American Income Life Insurance Co. Phone: (254)761-6649 1200 Wooded Acres Dr. Fax: (254)741-5777 Waco, Texas 76701
-----Original Message----- From: Kim Langtved Johansen [mailto:klj at Beredskabsstyrelsen.dk] Sent: Monday, June 04, 2007 7:53 AM To: hobbit at hswn.dk Subject: [hobbit] Howto get Hobbit to send email
Hey, I have being using Hobbit for a while. But now I want it to be able to send email notifications, but I can't get it to work. I have installet postfix on my server (Ubuntu) and set it up to relay to our main mailserver. I kan send mail from it with mutt. I have tryed to set at alert up in hobbit-alerts.cfg. And I can see that it is "sending a email.." in the /var/log/hobbit/notifications.log. But I can also se in /var/log/syslog that it is not sending anything to my main email server. As it do if I send with Mutt. Please help me... Best regards, Kim Johansen Beredskabsstyrelsen
This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at PrivacyAct at ailife.com.
This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at PrivacyAct at ailife.com.