[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Steadying monitoring processes without starting them
From: |
Dominic Harkness |
Subject: |
RE: Steadying monitoring processes without starting them |
Date: |
Fri, 13 May 2016 18:13:45 +0000 |
You may be able to add a condition like "if does not exist" that will override
the restart if the process isn't running. I'm not sure if you can avoid monit
logging every time it sees the process does not exist, though.
For example, if you want monit to double check before issuing a restart you
could say: "if does not exist for 2 cycles then restart". It will log that the
process was not running in the first cycle and then restart the process if it's
not running in the second cycle as well.
Hope that helps!
Dominic
-----Original Message-----
From: monit-general [mailto:address@hidden On Behalf Of windoverwater
Sent: Friday, May 13, 2016 1:45 PM
To: address@hidden
Subject: Steadying monitoring processes without starting them
Hi all,
Pseudo newbie question - is it possible to start monitoring a process service
that has start and stop rules WITHOUT starting the process - specifically,
without monit calling the start command?
Been trying to achieve this by setting the mode to manual and just issuing a
'monit monitor foo'. But monit seems to always call the start function when
monit starts monitoring (when mode=manual).
Tried quitting monit, deleting the monit state file, restating monit. But even
in that test case issuing a monitor command to the service starts the service.
I was hoping that one would have to issue a start command to the service to
start the service and that issuing a monitor command would only start
monitoring.
Does the mode have to be set to passive for this to work this way? If so, does
that mean that monit will not automatically restart the process service if it
stops?
This is on monit 5.14 on centos 6.7.
Thanks much for any pointers/clarifications.
-sandy
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general