Monit seems to give up restarting a service if it fails a few times, and unmonitors it. I can't find anything in the documentation about the specifics of when or why. In my environment, I want it to keep trying on its poll intervals indefinitely. Is there any way to configure monit to never stop monitoring a service, even if it doesn't start up successfully?
|
|
I would simply use a cron job that would run |
|||
|
|
|
Based on your Monit code snippet, it looks like you have to modify or add cycle statements to your process stanza. See the relevant documentation here and here. It seems like you may want to set your service tests to execute every cycle with no timeout statement. Also look at your monit homepage at http://hostname:2812. Check the page for the relevant service and look at the "Existence" field. Your default should look like:
|
|||||
|
|
I had the exact same issue where despite restarting monit, it would refuse to monitor after the timeout. Finally figured out had to delete the monit state file ( |
||||
|
|