Subject: Run Command When Service Down

From: William Schroeder <[email-masked]>
Date: Sun, 13 Apr 2014 13:37:55 -0000

Is it possible to run a command when a service is down (preferably if it's been down for a certain period of time)? I understand that you can run a program to perform checks (like shown below), but is there a way to only run it if a service is down? I'm either having trouble finding a way to do it, or it's not possible directly from Argus.

Service Prog {
               # make sure no one deleted root from the passwd file
               command:       cat /etc/passwd
               expect:        ^root:
        }

Will

---

From: Jeremy Kister <[email-masked]>
Date: Sat, 17 May 2014 20:51:06 -0400

On 4/13/2014 9:37 AM, William Schroeder wrote:
> Is it possible to run a command when a service is down (preferably if

looks like <someone> just kicked the list.  if you're still looking for 
a solution, you can use a notify method to kick off your code.  it'll be 
triggered as soon as the object is "down".

Method "somemethod" {
    qtime: 0
    nolotsmsgs: yes
    command: /usr/local/script/somescript -a %R
}

Host "test1" {
     Service Ping {
      notifyalso: somemethod:
      # or, to also send an argument-
      #notifyalso: somemethod:someargument
     }
}

---

From: William Schroeder <[email-masked]>
Date: Sun, 18 May 2014 00:53:30 +0000

That's what I ended up doing something similar. Oddly though I sent the emails that just came through a couple of months ago. The use of notifyalso is probably a better way than I did it. I'll change mine to that, thank you for the feedback.

Will

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Jeremy Kister
Sent: Sunday, May 18, 2014 02:51 AM
To: Discussion about Argus
Subject: Re: Run Command When Service Down

> Is it possible to run a command when a service is down (preferably if

looks like <someone> just kicked the list.  if you're still looking for a solution, you can use a notify method to kick off your code.  it'll be triggered as soon as the object is "down".

Method "somemethod" {
    qtime: 0
    nolotsmsgs: yes
    command: /usr/local/script/somescript -a %R }

Host "test1" {
     Service Ping {
      notifyalso: somemethod:
      # or, to also send an argument-
      #notifyalso: somemethod:someargument
     }
}
_______________________________________________
http://argus.tcp4me.com/
[email-masked]
http://www.tcp4me.com/mailman/listinfo/arguslist