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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Yiwen Jiang
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
system.

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
[localhost:2812]
[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
anymore

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.

Cheers,
Yiwen

--
Yiwen Jiang
Nortel Networks
E-mail: [hidden email]
Phone: (613) 763-4286
ESN: 393-4286
 


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

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

Jan-Henrik Haukeland

On 27. okt. 2005, at 22.21, Yiwen Jiang wrote:

> My questions are:
> 1. Is this expected behaviour?

Yes

> 2. Is there a 'state' file that monit uses on monitoring services that
> survives reboots?

Yes

> 3. What do I need to do so that all services are monitored at the
> re-start of monit?

Either remove the state file before monit is started or issue this  
command right after monit was started: "monit monitor all". The  
default location for the state-file is, $HOME/.monit.state

--
Jan-Henrik Haukeland
Mobil +47 97141255



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general