monit-general
[Top][All Lists]
Advanced

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

Re: Is there a way to tell Monit to monitor by default all new services?


From: Ciprian Dorin Craciun
Subject: Re: Is there a way to tell Monit to monitor by default all new services?
Date: Thu, 6 Aug 2020 20:42:42 +0300

On Thu, Aug 6, 2020 at 8:30 PM Lutz Mader <lutz.mader@freenet.de> wrote:
> to disable all automatic restarts by monit I use "mode passive" only.
>
> Monit do not start a service with "mode passive".
>
> But "set onreboot nostart" set all services to "Not monitored" after the
> monit restart. This seem to me normal behaviour, I do some tests with
> monit 5.27.0 for macOS.
>
> You can not use "set onreboot nostart", if you are interresting in the
> monitoring data.


Thanks for the pointers.  It is interesting and quite strange at the
same time...  :)

I say "strange" because the behaviour is somewhat counter-intuitive to
the "words" in the configuration and the manual.  For example:

* `mode passive` -- will not start / restart any services
automatically but will monitor them by default;  (I've not tested
this, I base this on what you've said in the earlier email;)
* `mode passive + set onreboot nostart` -- will not start / restart
services automatically, but will also not **monitor** them either due
to the `onreboot nostart`;  (the confusing item is that `nostart`
actually implies "unmonitor" here;)

Moreover the documentation states:
~~~~
[mode section]
In active mode, Monit will pro-actively monitor a service and in case
of problems raise alerts and restart the service. Active is the
default mode.
The passive mode is similar to the active mode, except if the service
fails, monit will not try to fix a problem by restarting the service
and will raise alerts only.
[onreboot section]
In nostart mode, the service is never started automatically after reboot
~~~~

Which implies that `passive` will "pro-actively monitor a service" but
"will not try to fix a problem", and that `onreboot` is actually
involved with the starting or not the service once the system has been
rebooted.

My expectations (based on the manual) are as follows:
* `mode` involves the act of "fixing", i.e. restarting or not a
service if it goes down;
* `onreboot` involves the act of starting or not the service on reboot;
* none of these should impact in any manner the "monitored" /
"unmonitored" status of a service;

Thanks,
Ciprian.



reply via email to

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