[Top][All Lists]

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

Re: monit doesn't run stop action

From: Lutz Mader
Subject: Re: monit doesn't run stop action
Date: Sat, 9 Mar 2019 14:08:43 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hello Marc,
yes, this is ugly, but this is the way how monit work.
Unfortunately Monit handle stopped resources like unmonitored resources,
or vice versa. The "Not monitored" resources are ignored by monit, only
"start" or "monitor" commands are honored.

> Before "bar" is shutdown by a method outside of my control I issue a "monit
> unmonitor bar". What I was unaware of is issuing this command on the "bar"
> process results in it being issued internally for all other processes that
> are dependent on it. A minute later when I issue the "monit stop foo"
> command it does nothing as it no longer believes the "foo" process is

I remove the dependencies for some resources to fix problems like this
or add add additional resources to define implicit dependencies. And I
check the application log files to find applications/resources are
started/stopped by other tools.

The old way:
"proc3" depends to "proc2" depends to "proc1"

check process proc3
if failed port 1234 then alert
depends proc2

My new way:
"proc2" depends to "host1"
"proc3" depends to "host2"

check process proc3
depends host2

check host host2
if failed port 1234 then alert

As long as nobody disable the host check the applications/resources
depends to the host/port are ready to start if the port became available.
To start an or all applications/resources I use "unmonitor" and Monit
will start the applications/resources step by step. And "stop" is used
to stop the applications/resources, but I never stop the host checks.

A suggestion only,

reply via email to

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