[Top][All Lists]

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

Re: [monit] Condition Process Checking?

From: Martin Pala
Subject: Re: [monit] Condition Process Checking?
Date: Tue, 11 May 2010 21:39:34 +0200


yes, you can define checks like this:

set alert address@hidden

check process1 with pidfile /var/run/
  start program = "..."
  stop program = "..."

check process2 with pidfile /var/run/

check process3 with pidfile /var/run/

The process2 and process3 checks don't need any extra options - when the 
process won't exist, it will generate alert automatically and since there is no 
start/stop program, it won't try to restart the process.

If process2 and process3 have no pidfile, you will need to create it with 
current version of Monit. The next monit version (5.2) allows process check 
based on pattern matching - no need for pidfile, so it is possible to check 
processes like this:

check process vmware-debian matching "/usr/lib/vmware/bin/vmware-vmx 

... the vmware infrastructure is similar to your case - the virtual machines 
are started by one process, but particular machines have no pidfile.

The monit 5.2 ill be release most probably till the end of May, if you want to 
get development version, you can get source code from subversion:

svn checkout monit


On May 11, 2010, at 4:55 AM, Robin Abecasis wrote:

> Hi,
> I've searched the FAQ and the list for an answer to this, but didn't find 
> anything.
> I need to check 3 processes. Parent Process1, that will either start 
> process2, or kill process2 and start process . I would like Monit to 
> monitor/handle Process1 (done), but i am stuck on the conditional part of how 
> to monitor Process2 or Process3. I don't need Monitor to automagically 
> start/stop Process2 or Process3, but i need to know if neither (ie only 
> Process1) are running.
> Is this possible?
> Cheers,
> Robin
> --
> To unsubscribe:

reply via email to

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