monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit] Problem with if changed pid


From: Martin Pala
Subject: Re: [monit] Problem with if changed pid
Date: Sat, 20 Sep 2008 22:36:56 +0200

The changed ppid test will be true if the ppid has changed *out-of- monit-control* for the given service check *context* (for example the process was restart manually without using "monit restart asterisk"). If monit performs the process restart, the ppid change is expected in the same service check context on next cycle and monit sets the ppid expectation according to new process's ppid.

In your case the first configuration evaluates the ppid change as true since you have two checks for the same process - the service "asterisk" restarts the process in its context (ppid change is expected) ... the "asterisk_pid" check tests the same process in it's own (second) context and doesn't expect the ppid change.


Martin



On Sep 18, 2008, at 7:49 PM, address@hidden wrote:

I have monit-5 beta 3 and dont understand this configuration:

THIS WORK (check change of pid and script /root/parar.sh run)
check process asterisk_pid with pidfile /var/run/asterisk.pid
     if changed ppid within 3 cycles then exec '/root/parar.sh'

check process asterisk with pidfile /var/run/asterisk.pid
     start program = "/etc/init.d/asterisk start"
     stop program  = "/etc/init.d/asterisk stop"
     if 4 restarts within 4 cycles then timeout
#     if changed ppid within 3 cycles then exec '/root/parar.sh'
     if failed port 5060 type udp protocol sip with target
"address@hidden:5060" and maxforward 3
              for 1 cycle then restart


THIS NOT WORK (dont check change of pid and script /root/parar.sh dont run)
#check process asterisk_pid with pidfile /var/run/asterisk.pid
#       if changed ppid within 3 cycles then exec '/root/parar.sh'

check process asterisk with pidfile /var/run/asterisk.pid
     start program = "/etc/init.d/asterisk start"
     stop program  = "/etc/init.d/asterisk stop"
     if 4 restarts within 4 cycles then timeout
     if changed ppid within 3 cycles then exec '/root/parar.sh'
     if failed port 5060 type udp protocol sip with target
"address@hidden:5060" and maxforward 3
              for 1 cycle then restart



Whats problem ?



___________________________________________________________________________________
Para fazer uma ligação DDD pra perto ou pra longe, faz um 21. A Embratel tem
tarifas muito baratas esperando por você. Aproveite!



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general





reply via email to

[Prev in Thread] Current Thread [Next in Thread]