silent nonexist restart unless "unsuccessful" or "too frequent"

Issue #754 closed
Former user created an issue

On Ubuntu 16.04 LTS with monit 5.16 as standard repo version.

Using monit to watch an ffmpeg process. The ffmpeg will eventually die -- its inevitable. But want monit to restart it. Since we know it will die, we don't want to be alerted on the trivial nonexist/exist because it's not really actionable. However, if the restart fails (eg, notexist persists), we do want to be alerted. Likewise, want to know if it happens too many times in a given timeframe.

For the former, does not appear possible to ignore the 'notexist' event for a local service alert, yet also have same identical event alert still enabled with 'reminder' cycles?

For the latter, there is no mechanism for failure-over-time measurement?

Comments (2)

  1. Tildeslash repo owner

    I believe the functionality you ask for is available in Monit. But do upgrade to the latest version as 5.16 is old. Then please read the manual. You can filter out events of no interest and setup event thresholds, as demonstrated here

  2. Bill Houle

    "I believe"?

    I have read the manual. You cannot filter an alert for excluding an event and yet enable the same event for mandatory REMINDER. I want immediate restart (silent) but enabled REMINDER for N or more. I was willing to concede this might be possible, but does not appear to be.

    As for the 2nd part of the request, there is nothing even close to that capability. "FOR N CYCLES" is not what I want, because that would trigger the action if it persisted for N cycles. I want to handle the events IMMEDIATELY as per default, but at the same time count how many times they were handled in a given timeframe. If I were implementing, it might be something like: ALERT FOR {event} [REMINDER N] [FREQUENCY M PER T], where 'M' is a count and 'T' is a timeframe. ALERT FOR {notexist} FREQUENCY 4 PER 24H. In other words, if you have to restart a service "no big deal"; but if you have to do it 4 times in a day, there may be something you want to investigate.

  3. Log in to comment