Page 1 of 1

[Nagios-devel] Embedded sounds in Nagios 3

Posted: Fri Jul 18, 2008 6:26 am
by Guest
This is a multi-part message in MIME format.
--------------000203040506080302070901
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Hi,

I've been testing the sound embedded in pages on Nagios 3.0.3. Comparing
it to a clean install of Nagios 2, I noticed these two points:

1) There was a bug in the "Tactical overview" page, and the path to the
sound file was not included in the HTML output.

2) On a Windows machine, neither Firefox nor IE plays the sound :-(
I tracked this down to the "type" parameter in the HTML, which was
changed from "application/x-mplayer2" to "application/wav".

Please find attached a patch that corrects these two points, on the
3.0.3 source code.

While 1 is obviously just a typo, I imagine that 2 was a deliberate
change :) Maybe there is a better solution than just reverting this?

My windows machine is available for any testing of other values!

Regards,
Jonathan

PS: many thanks go to Cédric Temple for debugging this!
--
Jonathan Clarke

Open Source Software Assurance (OSSA) - Groupe LINAGORA
27 rue de Berri, 75008 Paris
Tél: 01 58 18 68 28, fax: 01 58 18 68 29
http://www.linagora.com - http://www.08000linux.com

--------------000203040506080302070901
Content-Type: text/x-diff;
name="nagios_3.0.3_nosound.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nagios_3.0.3_nosound.patch"

diff -Naurb nagios-3.0.3/cgi/status.c nagios-3.0.3_patched/cgi/status.c
--- nagios-3.0.3/cgi/status.c 2008-06-23 16:47:46.000000000 -0400
+++ nagios-3.0.3_patched/cgi/status.c 2008-07-18 05:55:38.000000000 -0400
@@ -438,7 +438,7 @@
else if(problem_services_unknown==0 && problem_services_warning==0 && problem_services_critical==0 && problem_hosts_down==0 && problem_hosts_unreachable==0 && normal_sound!=NULL)
sound=normal_sound;
if(sound!=NULL){
- printf("",url_media_path,sound);
+ printf("",url_media_path,sound);
printf("",url_media_path,sound);
printf("");
printf("");
diff -Naurb nagios-3.0.3/cgi/tac.c nagios-3.0.3_patched/cgi/tac.c
--- nagios-3.0.3/cgi/tac.c 2008-02-21 01:17:37.000000000 -0500
+++ nagios-3.0.3_patched/cgi/tac.c 2008-07-18 05:55:36.000000000 -0400
@@ -323,7 +323,7 @@
else if(services_unknown_unacknowledged==0 && services_warning_unacknowledged==0 && services_critical_unacknowledged==0 && hosts_down_unacknowledged==0 && hosts_unreachable_unacknowledged==0 && normal_sound!=NULL)
sound=normal_sound;
if(sound!=NULL){
- printf("");
+ printf("",url_media_path,sound);
printf("",url_media_path,sound);
printf("");
printf("");

--------------000203040506080302070901--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]