[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to stop monitoring a service when you stop it manually
From: |
Mike Pepe |
Subject: |
how to stop monitoring a service when you stop it manually |
Date: |
Sat, 08 Apr 2006 00:07:32 -0400 |
User-agent: |
Thunderbird 1.5 (Windows/20051201) |
Hi all,
I've just got monit up and running on my fedora core 3 system. So far it
seems to be running just fine.
I wanted to make sure that monit won't start a service that's been
manually shutdown. Services that have been stopped manually/cleanly
would be missing their lockfile. So I added a dependency such that if
the lockfile is missing, the service should be unmonitored. such as this:
check process freshclam with pidfile /var/run/clamav/freshclam.pid
group freshclam
start program = "/etc/init.d/freshclam start"
stop program = "/etc/init.d/freshclam stop"
if 5 restarts within 5 cycles then timeout
depends on freshclam_lock
depends on clamd
check file freshclam_lock with path /var/lock/subsys/freshclam
group freshclam
if failed uid root then unmonitor
if failed gid root then unmonitor
but, it doesn't do what I expect.
Sorry about the n00b question, but what am I doing wrong? I'm assuming
that if the file is missing that the gid/uid check will fail- perhaps
there's a better way to do that too.
Thanks
-Mike
- how to stop monitoring a service when you stop it manually,
Mike Pepe <=