Open SimoneFalzone opened 3 years ago
I like this idea, you could probably do the same with routing plugin, but with this there's no need to code the logic in routing plugin.
Is MS_TEAMS_WEBHOOK_URL
used as a default/catchall channel ? If so could you explain that in README.md
.
Is it possible to all attributes from https://docs.alerta.io/en/latest/api/alert.html#attributes to do matching/mapping ?
(Slack plugin seems to use configuration ending in _MAP
, so perhaps MS_TEAMS_ALERT_WEBHOOK_MAP
instead of MAPPING ?)
@jjh74
Is MS_TEAMS_WEBHOOK_URL used as a default/catchall channel ? If so could you explain that in README.md. Is it possible to all attributes from https://docs.alerta.io/en/latest/api/alert.html#attributes to do matching/mapping ?
Yes it can be used as default channel. I have added the missing documentation.
(Slack plugin seems to use configuration ending in _MAP, so perhaps MS_TEAMS_ALERT_WEBHOOK_MAP instead of MAPPING ?)
Good point that I have not seen that. I renamed the MS_TEAMS_ALERT_WEBHOOK_MAPPING
to MS_TEAMS_ALERT_WEBHOOK_MAP
.
Hey @jjh74 any good news on this PR?
@SimoneFalzone Nick(@satterly ) maintains alerta. Perhaps Nick has some time to take a look at this.
Problem: Currently it is not possible to send alarms to multiple channels. Also, it is not possible to filter alarms based on their attributes and assign them to a specific channel.
Proposal for a solution:
The
MS_TEAMS_ALERT_WEBHOOK_MAPPING
configuration variable can be used to form a mapping based on attribute values from an alert to a specific teams webhook. Also custom attributes are supported. For example:If all attributes of an alarm are matched for multiple mappings, the alarm is sent to each matching channel.