Page 1 of 1

Nagios Audio Alerts

Posted: Wed Mar 07, 2012 2:39 pm
by MSilcox
Hello, all.

Running Nagios 3.2.3 and having trouble configuring the Audio Alerts. Currently, this is how I have everything set up:

Sound Files Location

/srv/www/htdocs/nagios/share/media

Sound Files

critical.wav
hostdown.wav
warning.wav

Configuration

/srv/www/htdocs/nagios/etc/cgi.cfg

# SOUND OPTIONS
# These options allow you to specify an optional audio file
# that should be played in your browser window when there are
# problems on the network. The audio files are used only in
# the status CGI. Only the sound for the most critical problem
# will be played. Order of importance (higher to lower) is as
# follows: unreachable hosts, down hosts, critical services,
# warning services, and unknown services. If there are no
# visible problems, the sound file optionally specified by
# 'normal_sound' variable will be played.
#
#
# <varname>=<sound_file>
#
# Note: All audio files must be placed in the /media subdirectory
# under the HTML path (i.e. /usr/local/nagios/share/media/).

host_unreachable_sound=hostdown.wav
host_down_sound=hostdown.wav
service_critical_sound=critical.wav
service_warning_sound=warning.wav
service_unknown_sound=warning.wav
normal_sound=siren.wav


This has been driving me crazy for the past week. I have tried viewing the Host Groups with IE 8 and Firefox 10, but sounds still do not play. Any help AT ALL would be greatly appreciated. Even if you are having the same issue and haven't solved it yet, I would love to hear it as I am slowly losing my mind. I have been dreaming in green text since I tried solving this.

Re: Nagios Audio Alerts

Posted: Fri Mar 09, 2012 6:20 am
by ninety
Suggest looking at "view source" in your browser to make sure the HTML is there to play the audio. If not, then it's a config issue.

If the HTML is there, suggest looking in your web server log to see if the files are in fact accessed and sent to the browser. Should give you some clues.

Re: Nagios Audio Alerts

Posted: Fri Mar 09, 2012 1:37 pm
by MSilcox
Oddly enough, the only .wav file that shows up in the source is as follows:

<object type="audio/x-wav" data="/nagios/media/warning.wav" height="0" width="0"><param name="filename" value="/nagios/media/warning.wav"><param name="autostart" value="true"><param name="playcount" value="1"></object><P>

My Nagios directories aren't set up like how it is referenced above, so I'm not entirely sure where it is grabbing that sound file from. I guess I'll just keep digging for answers.

Re: Nagios Audio Alerts

Posted: Mon Mar 12, 2012 1:42 pm
by scottwilkerson
Do you get an error in you httpd error_log showing the path of the missing file?
MSilcox wrote:Oddly enough, the only .wav file that shows up in the source is as follows:

<object type="audio/x-wav" data="/nagios/media/warning.wav" height="0" width="0"><param name="filename" value="/nagios/media/warning.wav"><param name="autostart" value="true"><param name="playcount" value="1"></object><P>
It would be normal for only 1 to show up because it is only inserting the one that is supposed to play.