Sound an alarm

Terry L. Inzauro tinzauro at ha-solutions.net
Tue Jun 21 15:27:33 CEST 2005


Richard Harman wrote:
> Serial interface?  Alarm clock?  Wow.  Leave it to the EEs to whip out a 
> soldering iron. ;)  Not that there's anything wrong with that.
> 
> I'm in the process of replacing a WhatsUpGold box (that already makes 
> noise and has a decent pair of speakers that can be heard throughout the 
> entire OPS floor) with Nagios, and here's my solution to the same problem:
> 
> misccommands.cfg:
> define command {
>   command_name host-notify-by-sound
>   command_line $USER2$/notify_by_sound $HOSTSTATE$
> }
> 
> notify_by_sound:
> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> 
> my ($status) = @ARGV;
> 
> if ($status eq "DOWN" || $status eq "UNREACHABLE")
> { system("/usr/lib/nagios/plugins/check_nrpe -H 
> windows.box.running.nrpe-nt -c sfx_hostdown"); }
> else
> { system("/usr/lib/nagios/plugins/check_nrpe -H 
> windows.box.running.nrpe-nt -c sfx_hostup"); }
> 
> sfx_hostdown.cmd:
> @echo off
> sndrec32 /play /cluse "c:\nrpe\host_down.wav":
> echo Command completed successfully
> exit 0
> 
> HTH!
> 
> Rusch, Daniel wrote:
> 
>> All,
>>  
>> How can I have Nagios sound a physical alarm. In other words I want to 
>> wake up the NOC if a a system goes critical?
>>  
>> Thank you,
>>  
>> Daniel G. Rusch
>> x2027
>>  
> 
> 
> 


Hey now Mr. perl dude.

tmtowtdi


As far as the part that you will need, I would recommend something along 
these lines.  Get creative, this is the fun part of comuter systems.

http://www.phanderson.com/iom141.html


_Terry




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&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