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