On Qua, 2005-12-14 at 22:39 +0100, Arno Lehmann wrote: > > 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? > 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.
When Mr. Mitsuto said something about permissions, I checked all possibilities, and made this: [EMAIL PROTECTED]:/etc/nagios# su - nagios -s /bin/bash [EMAIL PROTECTED]:~ $ /usr/bin/aplay /usr/share/nagios/htdocs/media/critical.wav Playing WAVE '/usr/share/nagios/htdocs/media/critical.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono [EMAIL PROTECTED]:~$ It made a sound! But: [EMAIL PROTECTED]:/etc/nagios# su - nagios -c "/usr/bin/aplay /usr/share/nagios/htdocs/media/critical.wav" [EMAIL PROTECTED]:/etc/nagios# This makes nothing. Anyway, it is clear that the nagios user is able to access /dev/dsp, since it played the sound on the first attempt. > Permissions on aplay, the wav file, or anything else? An aplay ... > >>/var/log/buzina.log might also show some error messages. I made that also, but no output to the log from aplay, just the echo "Playing" >> log... Should I give up? :) I refuse to! -- Marcio Merlone <[EMAIL PROTECTED]> Ambiente Brasil ------------------------------------------------------- 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@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