-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
What did you do?
When using the msteamsv2 notification integration, the alerts do not display correctly on the Microsoft Teams mobile app. This issue seems to be caused by the card text being truncated on mobile devices. For reference, Microsoft’s guidelines for designing effective cards can be found here: Microsoft Docs - Design Effective Cards. I tested adding wrap: true in the template msteamsv2.go, and it resolved the issue.
I recorded the JSON generated by Alertmanager and used curl to reproduce this issue.
curl -X 'POST' '<msteams webhook url>' -H 'content-type: application/json' -d $'{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "\nPrometheus Alert 🔥 Firing:1 🔥",
"weigth": "Bolder",
"size": "Medium",
"wrap": true,
"style": "heading",
"color": "Attention"
},
{
"type": "TextBlock",
"text": "\n**Found 1 unattached disks.**\n- **description**: Found 1 unattached disks.\n\n\n- **alertname**: UnattachedDiskFound\n"
}
]
}
}
]
}'
Metadata
Metadata
Assignees
Labels
No labels

