|
From: | Martin Pala |
Subject: | Re: monit check that a process does NOT exist |
Date: | Tue, 11 Nov 2014 15:27:13 +0100 |
It is possible (using the "else if succeeded then ..." part: if does not exist then alert else if succeeded then exec "/usr/local/monit-scripts/ruby-daemon.sh push_notification stop" Monit is however design to keep the process running, so if the process will be online on Monit start, the action won't be executed, as it must fail first in order to allow the fail->success transition. It could be thus better to use "check program" with simple pgrep based script, more details about the "check program": http://www.mmonit.com/monit/documentation/monit.html#PROGRAM-STATUS-TESTING Regards, Martin
|
[Prev in Thread] | Current Thread | [Next in Thread] |