monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Condition Process Checking?


From: Robin Abecasis
Subject: Re: [monit] Condition Process Checking?
Date: Wed, 12 May 2010 00:23:15 -0400

Hi,

Many thanks for your response, but i don't think your configuration quite meets 
my needs. In your example, i would be alerted if process2 OR process3 aren't 
running, correct?

I need to be alerted if process2 AND process3 aren't running. Process1 will 
start either Process2 or Process3, never both at the same time and never 
neither (unless something bad has happpened, hence needing Monit! :) ). Is this 
possible?

Since in my case, neither Process2 or 3 have PID files, i will have to wait 
until your v5.2 release. Is there any documentation of what else will be in the 
v5.2 release?

Thanks again for your response, i look forward to hearing back from you.

Cheers,
Robin

On May 11, 2010, at 3:39 PM, Martin Pala wrote:

> Hi,
> 
> yes, you can define checks like this:
> 
> --8<--
> set alert address@hidden
> 
> check process1 with pidfile /var/run/process1.pid
>  start program = "..."
>  stop program = "..."
> 
> check process2 with pidfile /var/run/process2.pid
> 
> check process3 with pidfile /var/run/process3.pid
> --8<--
> 
> 
> 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:
> 
> --8<--
> check process vmware-debian matching "/usr/lib/vmware/bin/vmware-vmx 
> .*debian4-x86.vmx"
> --8<--
> 
> ... 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 http://monit.googlecode.com/svn/trunk/ monit
> 
> Regards,
> Martin
> 
> 
> 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:
>> http://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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