[hobbit] Alert script help
Francisco Carmona Leon
fcarmona at cfe.gob.mx
Wed Sep 13 22:40:13 CEST 2006
I saw in the page.log this line:
sox: Can't open output file '/dev/dsp': Permission denied
I changed this and now is shouting all my alerts.
root at larissa:~# ll /dev/dsp
crw-rw---- 1 root audio 14, 3 2006-09-07 17:24 /dev/dsp
root at larissa:~# chmod 666 /dev/dsp
root at larissa:~# ll /dev/dsp
crw-rw-rw- 1 root audio 14, 3 2006-09-07 17:24 /dev/dsp
Muchas gracias.
Saludos desde Veracruz, México.
On Wed, 2006-09-13 at 22:10 +0200, Henrik Stoerner wrote:
> On Wed, Sep 13, 2006 at 11:58:25AM -0500, Francisco Carmona Leon wrote:
> > I need help to make this work.
> >
> > this is my configuration:
> >
> > hobbit-alerts.cfg
> > HOST=*
> > SCRIPT /usr/local/bin/smalert 1234123400 FORMAT=SMS
>
> Looks ok.
>
> > script
> > #!/bin/sh
> > /usr/local/bin/lee '"$BBHOSTNAME" alerta "$BBCOLORLEVEL" servicio
> > "$BBSVCNAME" con la direccion "$MACHIP" fuera por "$DOWNSECS"'
>
> There's a problem with the quoting of this. In most cases I've seen,
> when you put something inside single quotes in a shell, then environment
> variables are NOT expanded by the shell. E.g.:
>
> $ echo '"$BBHOSTNAME" alerta "$BBCOLORLEVEL"'
> "$BBHOSTNAME" alerta "$BBCOLORLEVEL"
>
> > I'm using the script option in my hobbit-alerts.cfg file because I need
> > to send a voice alert in my site but it doesn't work.
>
> "doesn't work" is fairly broad. Does your script get called when you
> expect it to ? You can put a statement into the script to log something
> to a file, so you can see if the script runs at all. My guess is that
> the script does run, but your script doesn't do as you expect it to.
> In that case, try running your script by hand:
>
> BBHOSTNAME=myhost BBCOLORLEVEL=yellow \
> BBSVCNAME=conn MACHIP=10.0.0.1 \
> DOWNSECS=120 \
> /path/to/script 1234123400
>
> You can also look at the "page.log" file in the hobbit logs directory;
> this captures any error messages generated by your script.
>
>
> Regards,
> Henrik
>
>
> 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/20060913/8ebbcbfc/attachment.html>
More information about the Xymon
mailing list