Created
May 14, 2021 13:57
-
-
Save danifitz/08a90c10d848afe111a78b1b488cef20 to your computer and use it in GitHub Desktop.
A JSON payload for a Microsoft Teams webhook that makes alerts look pretty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"summary":"$ACCOUNT_NAME New Relic Alert: $CONDITION_NAME in New Relic Alert - $POLICY_NAME", | |
"themeColor":"0076D7", | |
"@type":"MessageCard", | |
"potentialAction":[ | |
{ | |
"@type":"openUri", | |
"name":"Go To Incident", | |
"targets":[ | |
{ | |
"os":"default", | |
"uri":"$INCIDENT_URL" | |
} | |
] | |
}, | |
{ | |
"@type":"openUri", | |
"name":"Go To Policy", | |
"targets":[ | |
{ | |
"os":"default", | |
"uri":"$POLICY_URL" | |
} | |
] | |
} | |
], | |
"@context":"http://schema.org/extensions", | |
"sections":[ | |
{ | |
"activitySubtitle":"$SEVERITY violation $EVENT_STATE at $TIMESTAMP_UTC_STRING", | |
"activityTitle":"New Relic Alert: $POLICY_NAME - $CONDITION_NAME" | |
}, | |
{ | |
"images":[ | |
{ | |
"image":"$VIOLATION_CHART_URL" | |
} | |
] | |
}, | |
{ | |
"markdown":true, | |
"facts":[ | |
{ | |
"name":"Assigned to", | |
"value":"Unassigned" | |
}, | |
{ | |
"name":"Runbook", | |
"value":"$RUNBOOK_URL" | |
}, | |
{ | |
"name":"Open Violations", | |
"value":"$OPEN_VIOLATIONS_COUNT_CRITICAL critical, $OPEN_VIOLATIONS_COUNT_WARNING warning violations" | |
}, | |
{ | |
"name":"Status", | |
"value":"$EVENT_STATE" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment