monit-general
[Top][All Lists]
Advanced

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

[monit] Can monit monitor multiple processes with the same name?


From: Bill Benedetto
Subject: [monit] Can monit monitor multiple processes with the same name?
Date: Tue, 09 Mar 2010 07:56:29 -0500

Good day.

I use monit (mostly) to watch my desktop systems and watch for
long-running, cpu-eating programs.

My stanza of interest looks like this:

  check process abcdef with pidfile /var/run/abcdef.pid
    alert address@hidden but not on { Nonexist }
    stop program = "/bin/bash -c 'kill `cat /var/run/abcdef.pid`'"
    if cpu usage > 22% for 64 cycles then stop

My abcdef process doesn't create a pidfile, so I have a cronjob
that runs a few times per hour and looks for the abcdef process,
creating a pidfile, and then tickling monit to take a look.

This works great for me.  However (you knew there had to be a
"however"), I sometimes have multiple abcdef processes on the
same machine.  monit DOES clean them up eventually, but just one
at a time since I can only watch one abcdef.pid.  (There's a
secondary problem that if I have, for example, 2 abcdef processes
running concurrently, they might each take 12% of the cpu and
thus monit never kills either one.)

Is there a way I can set monit up so that it is able to monitor
multiple abcdef processes concurrently?

Thanks!

-- 
- Bill
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Bill Benedetto     <address@hidden>    The Goodyear Tire & Rubber Co.
I don't speak for Goodyear and they don't speak for me.  We're both happy.





reply via email to

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