Xymon Mailing List Archive search

sms alert sample script

list Taylor Lewick
Fri, 11 Apr 2008 09:43:08 -0500
Message-Id: <user-5533fd3432e6@xymon.invalid>

Thanks, also, the way you use the smsplus.sh script, do you place in
/hobbit/server/ext and add it into the hobbitlaunch.cfg?  Or since its
just being called via alerts, do you not need to place it in
hobbitlaunch.cfg?

-----Original Message-----
From: Benjamin P. August [mailto:user-e992dd5eb2a5@xymon.invalid] 
Sent: Thursday, April 10, 2008 4:35 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] sms alert sample script

Here's what we use. It started out life as smsplus.sh on deadcat, and  
I swapped out one line so it has a more useful subject (because  
BB-style numeric codes are pointless):

----start script----
#!/bin/bash

msg=`echo "${BBALPHAMSG}" | egrep "&yellow|&red"`
msg="\n${msg}"

# CODE:
#=======
# subject="!HB ${ACKCODE}"
subject="!Hobbit ${BBHOSTNAME}"
alert="${BBHOSTSVC} ${BBCOLORLEVEL}"
message="\n${alert}${msg}"

echo -e "${message}" | mail -s "${subject}" $RCPT
----end script----

-- 
--Ben
Benjamin P. August
System Administrator - VPUE
Stanford University


Quoting Josh Luthman <user-4c45a83f15cb@xymon.invalid>:
HOST=*
  MAIL user-4c45a83f15cb@xymon.invalid COLOR=RED DURATION>15m REPEAT=60
RECOVERED FORMAT=SMS
  #SCRIPT /home/hobbituser/server/ext/smsplus.sh
user-5e5f9d502f85@xymon.invalid>15m
  #4sms#MAIL user-ede67799c5ea@xymon.invalid COLOR=RED DURATION>15m REPEAT=60
RECOVERED FORMAT=SMS

This what you're after?

On Thu, Apr 10, 2008 at 4:46 PM, Taylor Lewick
<user-ccbabb0b3ab0@xymon.invalid>
wrote:
 Can someone provide a sample script they are using to send out SMS
alerts
via hobbit.  If you are using add-on tools to do this please provide
which
tools you are using.

Is anyone creating aliases for phone numbers?


Thanks,

Taylor

--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer