Will restart of monit cause all services to be monitored again?
I am using monit V4.4 to monitor a list of services.
On a running system, if some services cannot be restarted for some
reason, I specify in the /etc/monitrc file to retry a number of times,
before 'timeout'. After a specified number of retries (in the
/etc/monitrc file), monit shows that it will give up monitoring the
For example, I have a service called foobar, which failed to start
multiple times (5 times in this case), and exceeded the limit I
specified in the /etc/monitrc file:
check process foobar
with pidfile "/var/run/foobar.pid"
start program = "/etc/rc.d/init.d/foobar start"
stop program = "/etc/rc.d/init.d/foobar stop"
if 5 restarts within 6 cycles then timeout
However, when I rebooted the system, monit gets restarted, and this
service is still not monitored. From /var/log/monit.log, I have:
[EDT Oct 27 14:07:55] Starting monit daemon with http interface at
[EDT Oct 27 14:07:55] Starting monit HTTP server at [localhost:2812]
[EDT Oct 27 14:07:55] monit HTTP server started
[EDT Oct 27 14:07:56] 'foobar' service timed out and will not be checked
And command 'monit status' shows:
status not monitored
monitoring status not monitored
data collected Thu Oct 27 15:37:57 2005
My questions are:
1. Is this expected behaviour?
2. Is there a 'state' file that monit uses on monitoring services that
3. What do I need to do so that all services are monitored at the
re-start of monit?