mattermost-plugin-alertmanager
mattermost-plugin-alertmanager copied to clipboard
alerts for different teams all ending up in the same channel
I'm testing the multiple teams feature, sending mock alerts to mattermost using curl like so:
$ curl -i -X POST 'https://mattermost.my.domain/plugins/alertmanager/api/webhook?token=LONG-TEAM-TOKEN' -d '{
"version": "4",
"status": "firing",
"groupKey": "testing",
"truncatedAlerts": 0,
"alerts": [
{
"annotations": {
"name": "TestAlert to itds team?"
},
"labels": {
"alertname": "testalert1",
"instance": "testinstance1",
"source": "jenkins"
}
}
]
}'
I have created three teams with different names but identical channel names (all use the town-square channel). When I send the above alert using the different tokens, all alerts end up in the channel of the third team! (Note the different AlertManagerPluginId on the different alert messages):
However, I find the plugin works well if I use the same team and different channels, or several teams and a differently named channel on each. So somewhere in the "multiple teams" feature uses just the channel as a key, whereas different alertmanagers should really be keyed by both team and channel, no?
BTW, while this is very useful for understanding the problem, I don't think AlertManagerPluginId
should be added to the Annotations displayed to the user...