Monit uses "restart program" instead of "start program" when service is down
Issue #69
resolved
I think monit should use "start", when process is down and "restart" when I say monit restart.
[CEST Jul 10 07:58:28] error : 'great_stuff' process is not running [CEST Jul 10 07:58:28] info : 'great_stuff' trying to restart [CEST Jul 10 07:58:28] info : 'great_stuff' restart: /etc/init.d/trackrdrd [CEST Jul 10 07:59:58] error : 'great_stuff' failed to start
I actually have a few processes where restart doesnt't work when process is down and I don't want to rewrite my init scripts.
Hans
Comments (2)
-
repo owner -
repo owner - changed status to resolved
closing - not Monit bug ... 3rd party script or configuration issue
- Log in to comment
If the process is not running, Monit triggers the "restart" action. The restart action itself depends on your Monit configuration:
1.) if your service has "start program" and "stop program" only, then Monit will execute the stop action only in the case, that the process is still running, otherwise stop is skipped and start program is called.
2.) Monit 5.7 or later has also "restart program" ... if it is defined, then it is preferred over stop+start for restart action.
=> the above described method (1) will call start only if the process died