Yeah, there is a better that I believe will do what you want.
Change that to:
check device opt with path /opt
if space usage > 99% then unmonitor
And then add this to your mysql check:
depends on opt
That should do it. Because mysql now depends on opt, if opt becomes
unmonitored, mysql should be stopped. You will have to manually tell monit
to start watching the filesystem again when you have clean up things.
You might even be about to do this:
check device opt with path /opt
if space usage > 99% then stop else start
If I am correct, this will cause the depenent service to stop when file
system is over 99% full and start it when the usage drops.
On Thu, Jan 24, 2013 at 2:10 AM, Nick Upson <[email protected]> wrote:
> currently I have
>
> check device opt with path /opt
> if space usage > 99% then
> exec "/bin/bash -c '/usr/bin/monit stop database'"
>
>
> --
> Nick Upson, Telensa Ltd
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>
--
Michael Johnson - MJ
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general