monit-general
[Top][All Lists]
Advanced

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

[monit] If x restarts within y cycles then exec ?


From: Dave Myron
Subject: [monit] If x restarts within y cycles then exec ?
Date: Thu, 3 Apr 2008 15:02:15 -0700 (PDT)

Hello everyone, 

I was wondering if there's a way to do something like this:

check process something with pidfile /var/run/something.pid
  start program = "/my/start_program"
  stop program = "/my/stop_program"

  ... tests here ...
  if 3 restarts within 5 cycles then exec "/bin/bash -c 'kill -9 `cat
/var/run/something.pid`'"

That is apparently invalid syntax (seems that the if X in Y cycles syntax
only supports timeout). Is that true? If so, is there another way to do the
above?

Thanks, 
Dave Myron
-- 
View this message in context: 
http://www.nabble.com/If-x-restarts-within-y-cycles-then-exec---tp16473387p16473387.html
Sent from the monit-general mailing list archive at Nabble.com.





reply via email to

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