[Top][All Lists]

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

Re: How to monitor a process, which should not run

From: Phil Townes
Subject: Re: How to monitor a process, which should not run
Date: Thu, 12 Mar 2015 12:27:30 +0000

Thanks Martin, the new feature will be very welcome.
I currently have a number of processes that I need to stop if they are running.
The "if does not exist" will really simplify my monit config!


On 12 March 2015 at 11:50, Martin Pala <address@hidden> wrote:

you can use "check program" to trigger action if the program exists, something like:

        check program myprocess with path "/usr/bin/pgrep mypattern"
                if status = 0 then exec "/my/script"

The pgrep returns 0 if some process matched => monit will execute script in such case.

I have also created new feature request for simple native process existence (in addition to existing "if does not exist" statement), so we may implement this in the future:


> On 11 Mar 2015, at 13:47, address@hidden wrote:
> Hi,
> I’m wondering if it is possible to watch for unwanted processes. I need to know, if a process is running, which shouldn’t run.
> Is this possible with monit?
> How would the config look like?
> Kind regards,
> Michael
> --
> To unsubscribe:

To unsubscribe:

reply via email to

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