[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Alerts Question
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Alerts Question
- From: "Gary B." <gmbfly98 (at) gmail.com>
- Date: Thu, 17 Aug 2006 15:32:30 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cdu543dBEH8kyfCzlzQDuVjCIRp9sek9AvTKDtdCvT/7dPUng5xpLM8YLAFxeYWm8xSyQuS7S99XaA6X+oGJgE5FjGVt+iS/88zACOxDJCwpHqLVhHD6RzZmTXoa1CKd98rppeWclURzVCklMCQ3SnSaSCg+zBHG2uvCfUDc5bo=
- References: <C319D2BCA4F21E45B3403D4C1707014B08231231@FWSTEX03.fwst.fwstroot.star-telegram.com>
Hi, I seem to be having issues with the reliability with the alerts feature.
Look at the /var/log/hobbit/notifications.log and page.log files. You
might also want to manually test the alert rules to see how they work
My Hobbit-alerts.cfg is written as followed.
HOST=server1
MAIL number(at)cingularme.com RECOVERED
MAIL address(at)company.com RECOVERED
HOST=server2
MAIL number(at)cingularme.com RECOVERED
MAIL address(at)company.com RECOVERED
The alert rules I have are written as:
HOST=server1 RECOVERED
MAIL <phone address> REPEAT=interval
MAIL <company address> REPEAT=interval
. . .
HOST=* RECOVERED
IGNORE HOST=server
IGNORE HOST=server1
IGNORE HOST=server2
MAIL address(at)company.com
MAIL number(at)messaging.nextel.com
MAIL address(at)company.com
MAIL address(at)company.com
You can do
IGNORE HOST=server,server1,server2
MAIL <address1>,<address2>
I am not using SMS but using the phone provider's email to send test to a
phone. The messages poured in after a hobbit.sh restart, but then the quit
going through. Sometimes only the (at)company recipients go through. Also
for the cell phone emails is there a way I can customize messages sent to
the recipient? Ie. make the text short and sweet, (Server and Service status
only)
-Mike
Yes. I believe Hobbit has a method of doing that by itself, but I use
a custom external script, as I needed to slightly modify the way
SMS-style messages are sent. It's a short script, so I've included it
below. Just stick it into the /var/hobbit/server/ext directory (and
make sure it has the execute bit set). Then, create a MAIL rule as
below:
SCRIPT /var/hobbit/server/ext/oursms <address> FORMAT=SMS REPEAT
=1h
The "oursms" script:
#!/bin/sh
#VARIABLES:
msg=$BBALPHAMSG #Full text of message
code=$ACKCODE #The ack code
host=$BBHOSTNAME #Host name
# CODE:
#=======
subject="!HB ${code}" #Subject will read as "!HB <hobbit alert code>"
message="${msg}"
echo "${message}" | mail -s "${subject}" $RCPT
If you want to customize the script to change the way the subject
and/or body appear on the pager, look at the section titled "ALERT
SCRIPTS" at the bottom of the page:
http://hobbitmon.sourceforge.net/docs/manpages/man5/hobbit-alerts.cfg.5.html