[Top][All Lists]

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

Re: Intentionally stopping a daemon and preventing monit from restarting

From: Martin Konecny
Subject: Re: Intentionally stopping a daemon and preventing monit from restarting it
Date: Thu, 16 Jun 2011 20:07:58 -0400

Thanks to all (especially Jan-Henrik for providing the final missing piece), I have monit working exactly as I need :)


On Thu, Jun 16, 2011 at 6:29 PM, Jan-Henrik Haukeland <address@hidden> wrote:

On Jun 17, 2011, at 12:00 AM, Martin Konecny wrote:

> I also saw unmonitor as a command-line parameter to monit, but this requires monit to be started with http support. We want to include monit with our open-source software that will be shipped on to thousands of systems. It would problematic to modify the monit init.d scripts for every users system. Is there any other way?

The way to do this (and mentioned earlier in this thread) is to use the unmonitor or stop command line parameter. For instance; 'monit unmonitor apache' and then when you want to enable monitoring again, 'monit monitor apache'. You are correct that this requires the http interface enabled, but this is strongly recommended in any case as otherwise you will lose out on many useful features. What you do is enable the http interface on localhost only. This way you wont have to modify the init.d script. Only binding to localhost should be secure, especially if you add basic authentication credentials:

 set httpd port 2812 and use address
 #    SSL enable pemfile /some/path/monit.pem
 #    allowselfcertification
    allow localhost
    allow admin:monit

reply via email to

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