[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: "Dula, Mike" <mdula (at) star-telegram.com>
- Date: Thu, 17 Aug 2006 15:02:03 -0500
- Thread-index: AcbCNAW+B7LcGMvSQAK83FmHTjUVUgAA/Y7w
- Thread-topic: [hobbit] Alerts Question
Great thanks!
-----Original Message-----
From: Gary B. [mailto:gmbfly98 (at) gmail.com]
Sent: Thursday, August 17, 2006 2:33 PM
To: hobbit (at) hswn.dk
Subject: Re: [hobbit] Alerts Question
> 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
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk