Here's my problematic monit conf:
check program pingDispatcher with path "/usr/bin/node /.../pingDispatcher.js ..." timeout 60 seconds
if status != 0 then alert
if status != 0 then exec "/usr/sbin/service dispatcher restart"
The problem is that the pingDispatcher script will fail for a few minutes after every restart, so we get into an infinite restart loop.
I can fix that by using an "every X cycles" clause, where X is large, but that makes the original check much less useful -- it really should be running quite frequently.
Is there any way to pause the check for a few cycles after a failure?
thanks,
Bryan