Xymon Mailing List Archive search

getting alert to call scripts

list Robin Wood
Thu, 16 Aug 2007 22:34:23 +0100
Message-Id: <user-a2ccd7ad09c8@xymon.invalid>

Got it. Thanks

Robin

On 8/16/07, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid> wrote:
On 8/16/07, Robin Wood <user-c74ace4d3caf@xymon.invalid> wrote:
Bang on! I used /tmp so anyone could write to it but then had root
create the files and lock hobbit out!.

But, now that it is working no params are being passed into the scripts

#tail -f script sms text
==> script <==
Array
(
    [0] => /usr/local/bin/sendscript
)

==> sms <==
Array
(
    [0] => /usr/local/bin/sendsms
)

==> text <==
Array
(
    [0] => /usr/local/bin/sendemail
)

When I call it with params it has them so the script works.

# sendsms abc 123

==> sms <==
Array
(
    [0] => /usr/local/bin/sendsms
    [1] => abc
    [2] => 123
)

I assume that the that is the way it is supposed to work. Did your
version get params passed through?
The params are passed in the environment.  Take a look at "Configuring
Alerts" in the Help drop down on your Hobbit server.  Down near the
bottom of the page is the full list.  In particular, BBALPHAMSG (the
full text of the alert) and RCPT (the recipient).

Ralph Mitchell