Sound notification on nagios server

Deborah Martin Deborah.Martin at Kognitio.com
Wed Dec 14 14:15:23 CET 2005


Have you enabled sound in cgi.cfg ? 

-----Original Message-----
From: Marcio Merlone [mailto:marcio at ambientebrasil.com.br]
Sent: 14 December 2005 12:33
To: nagios-users
Subject: [Nagios-users] Sound notification on nagios server


Hello all.

I searched the web for this but could not find a proper solution. I am
trying to make the nagios server (not the web gui) play a sound when
there is something wrong. In this effort, I set:



misccommands.cfg:

define command{
        command_name    play_siren
        command_line    /sbin/sirene.sh
        }



/sbin/sirene.sh:

#!/bin/bash
data=`date`
echo "$data Making noise" >> /var/log/buzina.log
/usr/bin/aplay -q /usr/share/nagios/htdocs/media/critical.wav



contacts.cfg:

define contact{
        contact_name                    sirene
        alias                           Sound card on sever
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   play_siren
        host_notification_commands      play_siren
        email                           info at domain.tld
        }



contactgroups.cfg:

define contactgroup{
        contactgroup_name       buzina
        alias                   Placa de som na cedro
        members                 sirene
        }



hosts.cfg:

define host{
        use                     generic-host
        host_name               teste
        alias                   Just for fun
        address                 10.0.0.124
        check_command           check-host-alive
        max_check_attempts      20
        notification_interval   60
        notification_period     24x7
        notification_options    d,u,r
        }




services.cfg:

define service{
        use                             generic-service
        hostgroup_name                  teste
        service_description             PING
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  router-admins,buzina
        notification_interval           240
        notification_period             24x7
        notification_options            c,r
        check_command                   check_ping!100.0,20%!500.0,60%
        }



I have a sound card attached to the server, and issuing this command by
hand I can hear the sound. But when the test server is down the command
is not executed. The machine is an ubuntu 5.10 running kernel
2.6.12-10-k7, and nagios-mysql 1.3-cvs.20050402-4ubuntu3.

Please let me know if you need further information. Thanks in advance
for any help or hint.

Best regards,


-- 
Marcio Merlone <marcio at ambientebrasil.com.br>
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 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

************************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorised distribution or copying is strictly 
prohibited.

Whilst Kognitio Limited takes steps to prevent the transmission of 
viruses via e-mail, we can not guarantee that any email or 
attachment is free from computer viruses and you are strongly
advised to undertake your own anti-virus precautions.

Kognitio grants no warranties regarding performance,
use or quality of any e-mail or attachment and undertakes no 
liability for loss or damage, howsoever caused.
***********************************************************************



-------------------------------------------------------
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