monit-general
[Top][All Lists]
Advanced

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

[monit] how to stop a monitored group


From: Nick Upson
Subject: [monit] how to stop a monitored group
Date: Fri, 11 Jan 2008 12:32:37 +0000

I thought this would be simple, but it isn't. What I need is that
whenever the file is unchanged for 360 minutes stop several
monit-controlled processes but keep checking the file so that they can
be restarted when the file changes again. This is what I have:

    check file last_good_ntp with path /opt/unb/run/last_good_ntp
    if timestamp > 360 minutes then
       exec "/bin/bash -c 'monit -g ntpd_dependant stop all'"
    else if recovered then
       exec "/bin/bash -c 'monit -g ntpd_dependant start all'"

which goes into a loop as the call to monit causes it's tests to run,
which causes another call and round & round we go




reply via email to

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