[Top][All Lists]

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

Will restart of monit cause all services to be monitored again?

From: Yiwen Jiang
Subject: Will restart of monit cause all services to be monitored again?
Date: Thu, 27 Oct 2005 16:21:10 -0400

Hi there,

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/"
    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:

Process 'foobar'
  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
survives reboots?
3. What do I need to do so that all services are monitored at the
re-start of monit?

Thank you very much.


Yiwen Jiang
Nortel Networks
E-mail: address@hidden
Phone: (613) 763-4286
ESN: 393-4286

reply via email to

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