Re: Sometimes when restarting Monit it resets all services to unmonitored

Ciprian Dorin Craciun <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <CA+Tk8fxqeo+m5-sykgtKmXFtmeq+tvJLqX03q_-LZ7eBeMiTOw@mail.gmail.com>
On Thu, Aug 6, 2020 at 9:03 AM Lutz Mader <[email protected]> wrote:
> But based on a fast check, I can not find some additional scripts to do
> a shutdown in the package monit-5.25.1-lp151.2.3.x86_64.rpm
>
> Some other plattform specific monit packages use additional script
> samples to give some help. But sometimes the scripts are not useful.


I would exclude the possibility of explicit Monit commands on shutdown
or restart, due to the fact that I use a custom (from ground-up)
systemd unit, which besides the usual systemd "incantations" and the
resource limiting highlighted above, just calls `monit -c ... -I`;
nothing else is called on shutdown or restart.

My hunch is that something happens and corrupts the state file, thus
Monit recreates one from scratch;  the initial state of the services
(without a proper state file) seems to be unmonitored, thus the
situation.

Ciprian.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.