Closed mdfischer closed 4 years ago
Sorry, that was lazy of me. It seemed a really easy change to slip in late at night...I should have been more thorough...
OK I think this is good to go. Note that I changed the logic so that the default is to block no Slack messages if SLACK_SEVERITY_FILTER is not set or is an empty list. Only alerts with severities listed in SLACK_SEVERITY_FILTER will be blocked from being sent to Slack.
Thanks 👍
Adds configuration setting SLACK_SEVERITY_FILTER (list) in alertad.conf to allow filtering of alerts to be forwarded to Slack based upon their severity. For example, if
SLACK_SEVERITY_FILTER = ['warning']
, all alerts with 'warning' severity will NOT get processed or filtered by the other rules in the config file. Alerts of any other severity will pass through this filter.I found this useful because we use the Alerta UI as well as Slack, where we only want to get Slack notifications for the more serious stuff that requires immediate attention (severity levels of 'major' or 'critical'), and we leave it to our admin staff to look at the UI panel regularly to deal with less urgent lower level alerts.