[hobbit] How to send alert via script ?

Daniel Bourque dbourque at weatherdata.com
Wed Jun 6 17:47:58 CEST 2007


you can look at these logs

/var/log/hobbit/notifications.cfg
/var/log/hobbit/page.log

Daniel Bourque
Systems/Network Administrator
Weather Data Inc

Office (316) 266-8013
Office (316) 265-9127 ext. 3013
Mobile (316) 640-1024



casedj wrote:

> I put the commands in a script alert.sh and call that script in
> hobbit-alerts.cfg:
> HOST=my_linux SERVICE=disk
> SCRIPT alert.sh my_linux
> But still failed, no alert messages sent while disk state went to
> warning level, color was changed.
>
> alert.sh:
>
> #!/bin/sh
> echo "$RCPT disk went to warning state" |smbclient -M cici
> echo "$BBHOSTNAME disk reached warning state" |write hobbit
> This test scriptworks well in terminal mode.
> [hobbit at my_linux etc]$ ../bin/bbcmd hobbitd_alert --test my_linux disk
> 2007-05-31 06:04:23 Using default environment file
> /home/hobbit/server/etc/hobbitserver.cfg
> 00005798 2007-05-31 06:04:23 send_alert my_linux:disk state Paging
> 00005798 2007-05-31 06:04:23 Matching host:service:page
> 'my_linux:disk:' against rule line 120
> 00005798 2007-05-31 06:04:23 *** Match with 'HOST=my_linux
> SERVICE=disk' ***
> 00005798 2007-05-31 06:04:23 Matching host:service:page
> 'my_linux:disk:' against rule line 120
> 00005798 2007-05-31 06:04:23 *** Match with 'HOST=my_linux
> SERVICE=disk' ***
> 00005798 2007-05-31 06:04:23 Script alert with command 'alert.sh' and
> recipient my_linux
> The call looked like invalid, any other detail debug mechanism available?
> Thanks again.
> Case

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20070606/1b237453/attachment.html>


More information about the Xymon mailing list