[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Force monitoring of service?
From: |
Adam Nielsen |
Subject: |
Re: Force monitoring of service? |
Date: |
Fri, 21 Jan 2011 14:24:06 +1000 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20091130) |
However after having removed the timeout line from the monit config
file and restarting, monit has not automatically restarted the
services, which is something I expected it should do. I believe this
is because it thinks the services have been stopped manually, so I am
looking for a way of telling it that no, the service really died and
you should restart it if it's not already running when monit first loads.
I believe what you want is your startup config's to have just after
monit is started this call:
monit start all
Thanks Gareth - unfortunately this doesn't start the services. I think
it's because "monit status" reports the affected services as "not
monitored" so they're excluded from the 'start all' command.
Running "monit monitor all" doesn't help either, these two services are
still listed as "not monitored" and I can't see why.
For reference here's the monitrc section for one of the services:
check process exim with pidfile /var/run/exim.pid
group mail
start program = "/etc/init.d/exim start"
stop program = "/etc/init.d/exim stop"
if failed port 25 protocol smtp then restart
# Don't do this in case of an extended outage
#if 5 restarts within 5 cycles then timeout
depends on exim_bin
depends on exim_rc
check file exim_bin with path /usr/sbin/exim
group mail
if failed permission 4711 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
check file exim_rc with path /etc/init.d/exim
group mail
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
And here's what "monit status" reports:
Process 'exim'
status not monitored
monitoring status not monitored
data collected Fri Jan 21 14:21:28 2011
File 'exim_bin'
status accessible
monitoring status monitored
permission 4711
uid 0
gid 0
timestamp Thu Nov 20 03:34:48 2008
size 893528 B
data collected Fri Jan 21 14:21:28 2011
File 'exim_rc'
status accessible
monitoring status monitored
permission 755
uid 0
gid 0
timestamp Thu Nov 20 03:34:48 2008
size 738 B
data collected Fri Jan 21 14:21:28 2011
The pidfile is present and correct, and there's nothing in the logs to
indicate why the 'exim' service is not being monitored.
Cheers,
Adam.