monit-general
[Top][All Lists]
Advanced

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

Re: is there a better way?


From: Michael Johnson - MJ
Subject: Re: is there a better way?
Date: Fri, 25 Jan 2013 03:04:15 -0800

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 <address@hidden> 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

reply via email to

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