Execute Command on Alarm?

Percy Kwong psk at psk.net
Sat Apr 26 18:00:18 EDT 2008


Thanks for the reply!  I really appreciate it.

For what it's worth, This is what I'm trying to accomplish..

For some odd reason, my supermicro server (case + mobo) shuts down with 
the temp. light showing it's over heated.  The only way to reset the box 
is to power cycle the circuit.  (Pull the power plug out and replug 
in).  I wanted it to simply run the script that would then powercycle 
the server via an x10 appliance adapter automatically whenever the box 
goes offline.  I'm also trying to figure out why the machine itself is 
going thermal considering it's sitting in a room that is always 60 
degrees farenheit and those supermicro cases have more fans than a 
busload of dragonladys. 

Thanks.

-PK



Jeremy Kister wrote:
> On 4/26/2008 5:23 PM, Percy Kwong wrote:
>> I'm interested in executing a shell script (of my choosing) when a 
>> server goes down (via ping testing).  Is there a way for me to do this?
>
> i think the easiest is to set up a notify method:
>
> Method "MyMethod" {
>   command: /home/me/serverdown.sh
>   qtime: 0
> }
>
> and then in your notify: add MyScript
>
> notify: mail:2135552323 at example.com MyMethod:foo
>
> or, if you just want to execute the script for certain objects:
>  Group "somegroup" {
>    Group "special stuff" {
>     notifyalso: MyMethod:foo
>    }
>  }
>
> * where foo is some optional parameter you might want your script to get
>


More information about the Arguslist mailing list