[hobbit] SMS paging

Gary Baluha gumby3203 at gmail.com
Thu Mar 8 18:03:48 CET 2007


I wrote a custom external server-side script to do just that.  Consider the
license as open source.  To use the script, in the hobbit-alerts.cfg file,
use something like this:
SCRIPT /var/hobbit/server/ext/oursms <distro list> REPEAT=1h
COLOR=red,purple

#!/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


On 3/8/07, Jones, Jason (Altrincham) <JasonAS_Jones at mentor.com> wrote:
>
> I was thinking about this too, the only way I could think to possibly do
> it would be to make a script to grep for &color and send only that line
> on.  The only problem arises if the alert has no &color tag or has
> multiple (no script has emerged yet but it might once I get back to
> hobbit in about 2-3 weeks)
> Jason.
>
> -----Original Message-----
> From: Trent Melcher [mailto:tmelcher at saionline.com]
> Sent: 08 March 2007 16:30
> To: Hobbit
> Subject: [hobbit] SMS paging
>
> Is there a way or has anyone been able to hack something together to
> send more detail using the SMS tag.  Im using qpage to send out my SMS's
> to our pagers but it would be nice if it would send along the Error that
> actually triggered the alert.
>
> server1.somedomain.com.disk red 123456
>
> This is nice but it would be better if it could give you the details,
>
> server1.somedomain.com.disk red "/opt 99%" 123456
>
> or something similar.
>
> Thanks
> Trent
>
> Trent Melcher
> Unix/Linux Systems Administrator
> Securities America Financial Corporation
> (402) 399-9111 x2774
> tmelcher at saionline.com
>
> Securities America, Inc., a Registered Broker/Dealer, Member NASD/SIPC.
> Advisory services offered through Securities America Advisors, Inc., an
> SEC Registered Investment Advisory
>
> The text of this communication is confidential, and use by any person
> who is not the intended recipient is prohibited.  Any person who
> receives this communication in error is requested to immediately destroy
> the text of this communication without copying or further dissemination.
> Your cooperation is appreciated.
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20070308/12ba2c09/attachment.html>


More information about the Xymon mailing list