monit-general
[Top][All Lists]
Advanced

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

Re: Intentionally stopping a daemon and preventing monit from restarting


From: Jan-Henrik Haukeland
Subject: Re: Intentionally stopping a daemon and preventing monit from restarting it
Date: Fri, 17 Jun 2011 00:29:27 +0200

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 127.0.0.1
 #    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]