benjojo / alertmanager-discord

Take your alertmanager alerts, into discord
Apache License 2.0
177 stars 78 forks source link

Fix misrepresentation of alerts. #4

Closed rewbycraft closed 5 years ago

rewbycraft commented 5 years ago

Previously, when only a subset of alerts in a group resolves, the program will post the message as if all alerts in the group are firing. This is incorrect. This PR changes the behavior such that resolved alerts are displayed as resolved.

The source of the problem is that the program is currently only looking at the "common" status of the alerts, not at the individual alerts' status. This PR changes that by first sorting the alerts into lists based on their status, and then sending individual messages for each of the lists.

benjojo commented 5 years ago

PSA: @funkypenguin @intrand if you are still using this, you will want to update your versions since it could mis-report the status of some alerts

funkypenguin commented 5 years ago

Thanks @benjojo ;)