Last active
January 31, 2025 19:48
-
-
Save brenoepics/91d39fc03adc1d04f996aeb67caacbd7 to your computer and use it in GitHub Desktop.
New Relic Discord Webhook example
This file contains hidden or 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
{ | |
"username": "New Relic", | |
"avatar_url": "https://developer.newrelic.com/icons/icon-512x512.png", | |
"embeds": [ | |
{ | |
"title": "{{ annotations.title.[0] }}", | |
"description": "A new alert has been triggered in New Relic.", | |
"color": {{#eq priority "CRITICAL"}}16711680{{else}}{{# | |
eq priority "HIGH"}}16776960{{else}}{{# | |
eq priority "MEDIUM"}}16755200{{else}}{{# | |
eq priority "LOW"}}65280{{else}}1894275{{/eq}}{{/eq}}{{/eq}}{{/eq}}, | |
"fields": [ | |
{ | |
"name": "Issue ID", | |
"value": "{{ issueId }}" | |
}, | |
{ | |
"name": "Priority", | |
"value": "{{ priority }}" | |
}, | |
{ | |
"name": "Impacted Entities", | |
"value": "{{#with entitiesData}}{{#each names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}{{/with}}" | |
}, | |
{ | |
"name": "Total Incidents", | |
"value": "{{ totalIncidents }}" | |
}, | |
{ | |
"name": "State", | |
"value": "{{ state }}" | |
}, | |
{ | |
"name": "Trigger Event", | |
"value": "{{ triggerEvent }}" | |
}, | |
{ | |
"name": "Is Correlated", | |
"value": "{{ isCorrelated }}" | |
}, | |
{ | |
"name": "Created At", | |
"value": {{#timezone createdAt 'US/Eastern'}}{{/timezone}} | |
}, | |
{ | |
"name": "Updated At", | |
"value": {{#timezone updatedAt 'US/Eastern'}}{{/timezone}} | |
}, | |
{ | |
"name": "Sources", | |
"value": "{{#each accumulations.source}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}" | |
}, | |
{ | |
"name": "Alert Policy Names", | |
"value": "{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}" | |
}, | |
{ | |
"name": "Alert Condition Names", | |
"value": "{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}" | |
}, | |
{ | |
"name": "Workflow Name", | |
"value": "{{ workflowName }}" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment