BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} Custom messages
On Tue, 1 Feb 2005, Romero, Tony wrote:
Can anyone tell me how they've gotten around customizing the
notification bb sends out. Currently I'm limited to 60 characters in
our pagers and I'd like to implement a more concise custom message.
Have you tried the briefrcpt token in bbwarnsetup.cfg?
Another way is to create a custom paging script, like this (beware of
mailer-induced line breaks.) This assumes your pagers have email
addresses.
#!/bin/sh
#
# The following variables are available thru the environment
#
# BBALPHAMSG - Default message defined
# ACKCODE - Notification associated ack code
# BBHOSTSVC - host in www.xxx.com.disk format
# BBHOSTSVCCOMMAS - host in www,xxx,com.disk format
# RCPT - recipient
# MACHIP - IP address of host in normalized 12 digits AAABBBCCCDDD
# BBSVCNAME - name of service
# BBSVCNUM - numeric equivalent of service (from svcerrlist in bbwarnsetup.cfg)
# BBNUMERIC - ${MACHIP}${BBSVCNUM}
# BBCOLORLEVEL - Color level
# DOWNSECSMSG - Default recovery message
# DOWNSECS - # of seconds to recovery
# RECOVERED - 1 in recovery mode, anything else non-recovery mode
#
# The RCPT value contains the real recipient value. It was
# stripped of its ext-XXX- prefix (where XXX is what you called
# your notification script, in this example it would be ext-ex1-<recipient>)
#
if [ "$BBTMP" = "" ]
then
echo "BB environment not set !!!"
exit 1
fi
# is this a failure or recovery?
if test "$RECOVERED" = "1"
then
ACTION="recovered"
else
ACTION="failed"
fi
# send a short-n-sweet message. "Just the facts, m'am"
echo "$BBSVCNAME has $ACTION on $HOST" | $MAIL "$BBHOSTSVC" "$RCPT"
# log it for auditing purposes
echo "Sent \"$ACTION\" message to \"$RCPT\" regarding \"$BBHOSTSVC\" on `date`" >> $BBVAR/acks/phone.log
# all done
exit 0
--Jeff
"I am not available for comment"
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index