[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: monit start/stop in a synchronous mode
From: |
Martin Pala |
Subject: |
Re: monit start/stop in a synchronous mode |
Date: |
Tue, 14 Oct 2014 12:12:34 +0200 |
On 14 Oct 2014, at 11:18, Alainkr <address@hidden> wrote:
> Martin Pala wrote
>> If i understand you corrently, you wanted CLI to not return before the
>> action is done by Monit?
>
> Thinking about it there's 2 aspect to it :
>
> (1) Wait until invocation of the "stop program" returns
> (2) Wait until the PID as specified in the pid file finishes
>
> both are interesting. My primary need was for (1).
Monit 5.9 uses both steps for start/stop/restart programs - unline the "exec"
action in the test rule, which returns immediately and lets the program finish
on the background.
I recommend to modify the configuration like this:
--8<--
check file myappcol-log with path /home/myappcol/tomcat/logs/catalina.out
mode manual
group myappcol
depends on myappcol
if match "ERROR" then alert
if match "ERROR" for 10 cycles then unmonitor
if match "OutOfMemoryError" then exec '/usr/bin/monit restart myappcol'
# note: this restarts the myappcol service via monit (fix the monit path if
not present in /usr/bin/)
--8<--
Regards,
Martin
- monit start/stop in a synchronous mode, Alain Kreienbuhl, 2014/10/10
- Re: monit start/stop in a synchronous mode, Martin Pala, 2014/10/10
- Re: monit start/stop in a synchronous mode, Alainkr, 2014/10/10
- Re: monit start/stop in a synchronous mode, Martin Pala, 2014/10/13
- Re: monit start/stop in a synchronous mode, Alainkr, 2014/10/13
- Re: monit start/stop in a synchronous mode, Martin Pala, 2014/10/14
- Re: monit start/stop in a synchronous mode, Alainkr, 2014/10/14
- Re: monit start/stop in a synchronous mode,
Martin Pala <=
- Re: monit start/stop in a synchronous mode, Alainkr, 2014/10/14
- Re: monit start/stop in a synchronous mode, Martin Pala, 2014/10/15
- repeated file content match, Ben Soot, 2014/10/20
- Re: repeated file content match, Martin Pala, 2014/10/22
- Re: repeated file content match, Ben Soot, 2014/10/28