[Top][All Lists]

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

Re: [monit] Monit not saving state after restart

From: Martin Pala
Subject: Re: [monit] Monit not saving state after restart
Date: Sun, 22 Jun 2008 21:05:40 +0200


the state file is used just in case that monit was either reloaded (for example using "monit reload" or SIGHUP) or crashed and was started again to recover last state. If monit is stopped normally, the state file is not used on next start (it's unlinked/deleted on stop).

To test the state persistence, you can try "monit reload" or kill -9 monit and start monit ... the state including monitoring mode should recover.

I think we can optionally make the state file persistent even on monit stop (the change should be very easy since it should be sufficient to not unlink the state file on stop).


On Jun 22, 2008, at 6:33 PM, Paul Dowman wrote:

Hi, first of all thanks to the monit developers and all the helpful people on this list, you've done a great job! I searched the archives but haven't found the answer to this problem:

If I kill and restart the monit process it doesn't remember which services were being monitored, it thinks they're all in the unmonitored state.

I'm using monit with most of my services marked as "mode manual" because they're not necessarily always running. (The script that starts and stops them does "monit -g <groupname> monitor all".) The one service that's not manual is always monitored again after monit restarts.

The file /root/.monit.state does seem to be updated regularly so I'm guessing that file should contain info about what the state was before restart, is that correct? (btw I gave --localstatedir=/var/ run to the configure script but the only file that monit puts in / var/run is the pid file)


To unsubscribe:

reply via email to

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