Sound notification on nagios server
Arno Lehmann
al at its-lehmann.de
Wed Dec 14 22:39:07 CET 2005
Hello,
Marcio Merlone schrieb:
> On Qua, 2005-12-14 at 18:24 -0200, Marcel Mitsuto Fucatu Sugano wrote:
>
>>On Wed, 2005-12-14 at 11:46 -0200, Marcio Merlone wrote:
>>
>>>Yes, but this regards only for web clients browsing nagios, and it is
>>>working fine. BUT, I want the sound to be played on the nagios server,
>>>not my workstation.
>>
>>Nagios user has permissions on whatever /dev/dsp devices?
>
>
> It does now :)
More general approach: Try running your notification script as the user
nagios runs as. Or put it in a wrapper script that uses su or sudo to
execute the siren-script as, for example, root. That might give you some
clues... I guess it's a permissions problem you encounter.
> But still no sound. But while checking the permissions, I've got an
> improvement. Now the log file /var/log/buzina.log of the script gets
> populated....
>
> (Recording the script:)
>
> root at cedro:/etc/nagios# cat /usr/lib/nagios/plugins/sirene
> #!/bin/bash
> data=`date`
> echo "$data Tocando buzina" >> /var/log/buzina.log
> /usr/bin/aplay -q /usr/share/nagios/htdocs/media/critical.wav
> root at cedro:/etc/nagios#
>
> Good tip, but there is still something wrong.
Permissions on aplay, the wav file, or anything else? An aplay ...
>>/var/log/buzina.log might also show some error messages.
Arno
--
IT-Service Lehmann al at its-lehmann.de
Arno Lehmann http://www.its-lehmann.de
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list