Add alert silencing option

Issue #66 closed
Philipp Pfaff created an issue

Would be nice to be able to arbitrarily silence the alerting sometimes,

e.g. I unmonitor mysql in a script before taking it down and copying some files. After restarting the service I monitor it again

In this single case, I'd like to be able to stop monit sending emails.

I know I could configure the alerting to not react to [un]monitor events, but then, I wouldn't like to miss unintended [un]monitor events

Any idea on how to implement this? Ideally, I'd see something like monit unmonitor --mute <service>

Wdyt?

Comments (4)

  1. Tildeslash repo owner

    Why not just use monit unmonitor <service> at the start of your script and then enable monitoring with monit monitor <service> at the end?

  2. Tildeslash repo owner

    I see you point, if you do unmonitoring mysql and then monitoring mysql you will get two alerts, one when unmonitoring and one when monitoring. If you filter out, as you indicated, using set alert foo@bar but not on { action } you won't get these alerts. If I understand you correctly, you want this behaviour to be turned on and off by a command line switch statement, but be notified if someone forgets about the switch or don't use it? I'm not sure. If someone is using --mute unintentionally or you forget to use it, you are back to the original behaviour in any case. This will also complicate altering and the feature is kind of obscure and probably not going to be used by many. So we will probably not implement this as suggested. In the future maybe some kind of role based privilege system could be useful and hook that up to alerts.

    As a side note, in M/Monit you can kind of do this, by turing off alert during operations as indicated in the screenshot below.

    Screen Shot 2014-09-08 at 12.49.41.png

  3. Philipp Pfaff reporter

    First of all thank you for taking time to read my issue.

    I am not completely sure what to make out of this

    If someone is using --mute unintentionally or you forget to use it, you are back to the original behaviour in any case.

    Also, thank you for pointing me to M/Monit but:

    • I'd like to stay with the community version ie open source monit
    • I don't use GUIs to administer my servers, I'm afraid, we do automation as much as possible - coupled with intensive integration tests

    To reiterate and hope for clarification: the intention and rationale for the --mute switch was to shut off mail alerting on a one-time basis.

    Here a blog post of ours that partly explains the workaround we have had to implement to accomplish this (please don't laugh): http://www.cargomedia.ch/2014/04/25/reliably-reloading-monit.html

    That being said, we're actually quite happy with monit otherwise!

  4. Tildeslash repo owner

    I'd like to stay with the community version ie open source monit

    The great thing about open source is that you can fix it yourself if you need a new feature.

  5. Log in to comment