type of message

Phil Wild philwild at gmail.com
Mon Apr 21 19:16:49 CEST 2008


Hi hobbit lovers,

I have a requirement to include some decision making into the hobbit-alerts
configuration file.

For a particular group, I need to make a decision on if an email should be
sent or an sms should sent based on the result of running an external script
(e.g. connect to the corporate telephone list and check if a mobile phone
number is listed against a user with a certain email address. If I get back
a phone number, then I want to send an sms, otherwise, just send an email).

Now my question is this... When hobbit executes the script after detecting
an event, it can not determine if it will be sending an email or an sms
until AFTER the SCRIPT has commenced execution. Currently, I have
FORMAT=TEXT in the configuration which will give me the full message content
in the environment variable BBALPHAMSG. If I determine I can send an SMS, I
would prefer the short message type.

Does anyone know of a way to do this?

My guess is that I will need to write my own TEXT2SMS conversion script that
will give me a short message as close to the message format that hobbit
creates for sms's, or, hack the source to create a second ENV variable
BBSMSALPHAMSG containing the short message format so I have access to both
of them?

Any thoughts?

Cheers

Phil

-- 
Tel: 0400 466 952
Fax: 0433 123 226
email: philwild AT gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20080422/a989065a/attachment.html>


More information about the Xymon mailing list