[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intentionally stopping a daemon and preventing monit from restarting
Re: Intentionally stopping a daemon and preventing monit from restarting it
Thu, 16 Jun 2011 18:00:35 -0400
I looked up the unmonitor command and it looks like I need to somehow combine these two statements:
check file with path /var/run/airtime-playout.pid
if does not exists then unmonitor
check process airtime-playout
with pidfile "/var/run/airtime-playout.pid"
start program = "/etc/init.d/airtime-playout start" with timeout 10 seconds
stop program = "/etc/init.d/airtime-playout stop"
Im not sure if Im headed in the right direction.
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?
On Thu, Jun 16, 2011 at 5:08 PM, Aleksandrov Artyom <address@hidden>
You have to use monit command to start/stop/restart daemons to avoid
monit stop $daemon_name
Best regards Artyom.
С уважением, Артём.
On Fri, Jun 17, 2011 at 12:59 AM, Martin Konecny
> I just started using Monit to monitor a few of my daemons, and I'm very
> impressed with the simplicity. Good work! There is one thing that I'd like
> to do however, and I havent been able to find anything about it in the
> manual: What if I want to temporarily disable some of my daemons?
> Im running
> /etc/init.d/my-daemon stop
> which also removes the pid file. How do I prevent monit from restarting this
> process automatically?
> I figured the default behaviour would be that monit restarts the daemon only
> if the pid file exists. If it doesn't exist, we could assume that the
> program shutdown gracefully and the shutdown was intended.
> Do I have to disable monit and I want to temporarily disable my daemons?
> Here is my script:
>> check process airtime-playout
>> with pidfile "/var/run/airtime-playout.pid"
>> start program = "/etc/init.d/airtime-playout start" with timeout 10
>> stop program = "/etc/init.d/airtime-playout stop"