Get started with Opsgenie as a user
Learn how to configure your profile, get notifications from Opsgenie and view on-call schedules.
Opsgenie has a native integration with New Relic Workflows. Use the integration to send New Relic issues to Opsgenie’s API with detailed information. Opsgenie acts as a dispatcher for New Relic issues, determines the right people to notify based on on-call schedules– notifies via email, text messages (SMS), phone calls, and iPhone & Android push notifications, and escalates alerts until the alert is acknowledged or closed.
This document describes how to configure the integration and details of data that Opsgenie receives from New Relic.
When an alert is created in New Relic Workflows, an alert is also created in Opsgenie automatically through the integration.
When an alert is closed in New Relic Workflows, the related alert is also closed in Opsgenie automatically through the integration.
When an alert is acknowledged in New Relic Workflows, the related alert is also acknowledged in Opsgenie automatically through the integration.
You can add this integration from your team dashboard
If you're using Opsgenie's Free or Essentials plan, or if you’re using Opsgenie with Jira Service Management's Standard plan, you can only add this integration from your team dashboard as the Integrations page under Settings is not available in your plan.
Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only.
To do that,
Go to your team’s dashboard from Teams,
Select Integrations, and select Add integration.
Follow the rest of the steps to complete the integration.
Go to Settings > Integrations. Search for New Relic and select Add.
Add the people you want to notify for New Relic in the Responders field.
Copy the Endpoint URL.
Select Save Integration.
From the New Relic side menu, select Alerts & AI.
Go to Destinations and select Webhook from the options to add a new destination.
Enter a name for the Webhook name.
Enter the URL generated for you into the Endpoint URL field. You may find this URL in your Opsgenie’s New Relic integration page.
Select Save destination.
From Alerts & AI, select Workflows. Then select Add a workflow.
Filter the data as you wish, then select Webhook from Notify.
Select the webhook and the destination you’ve created above.
Copy the New Relic payload template (provided to you on the next step of this document). Then paste it into Payload template.
Select Send test notification and make sure it’s sent successfully. Then select Update message.
You’ll be taken back to the workflow page. Select Activate workflow.
Make sure the workflow is Enabled in New Relic.
Use this payload template while creating a new Workflow in New Relic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"tags": "tag1,tag2",
"teams": "team1,team2",
"recipients": "user1,user2",
"payload": {
"condition_id": {{json accumulations.conditionFamilyId.[0]}},
"condition_name": {{json accumulations.conditionName.[0] }},
"current_state": {{#if issueClosedAtUtc}} "closed" {{else if issueAcknowledgedAt}} "acknowledged" {{else}} "open"{{/if}},
"details": {{json issueTitle}},
"event_type": "Incident",
"incident_acknowledge_url": {{json issueAckUrl }},
"incident_api_url": "N/A",
"incident_id": {{json issueId }},
"incident_url": {{json issuePageUrl }},
"owner": "N/A",
"policy_name": {{ json accumulations.policyName.[0] }},
"policy_url": {{json issuePageUrl }},
"runbook_url": {{ json accumulations.runbookUrl.[0] }},
"severity": {{#eq "HIGH" priority}} "WARNING" {{else}}{{json priority}} {{/eq}},
"targets": {
"id": {{ json entitiesData.entities.[0].id }},
"name": {{ json entitiesData.entities.[0].name }},
"type": "{{entitiesData.entities.[0].type }}",
"product": "{{accumulations.conditionProduct.[0]}}"
},
"timestamp": {{#if closedAt}} {{ closedAt }} {{else if acknowledgedAt}} {{ acknowledgedAt }} {{else}} {{ createdAt }} {{/if}}
}
}
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"tags": "tag1,tag2",
"teams": "team1,team2",
"recipients": "user1,user2",
"payload": {
"condition_id": 1,
"condition_name": "test condition",
"current_state": "open",
"details": "CPU > 50% for 5 minutes",
"event_type": "INCIDENT",
"incident_acknowledge_url": "http://localhost/incident/1/acknowledge",
"incident_api_url": "http://localhost/api/incident/1",
"incident_id": 1,
"incident_url": "http://localhost/incident/1",
"owner": "John Doe",
"policy_name": "test policy",
"policy_url": "http://localhost/policy/1",
"runbook_url": "http://localhost/runbook/url",
"severity": "CRITICAL",
"targets": [
{
"id": "12345",
"link": "http://localhost/target/12345",
"name": "Test Target",
"labels": [
"production",
"hostname"
],
"type": "Server",
"product" : "productName"
}
],
"timestamp": 123456789000
}
}
This payload is parsed by Opsgenie as:
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[
"owner" : "John Doe",
"severity" : "CRITICAL",
"policy_url" : "http://localhost/policy/1",
"teams" : [
"team1", "team2"
],
"target_name" : "Test Target",
"target_type" : "Server",
"policy_name" : "test policy",
"incident_url" : "http://localhost/incident/1",
"incident_acknowledge_url" : "http://localhost/incident/1/acknowledge",
"tags" : [
"tag1", "tag2"
],
"event_type" : "INCIDENT",
"incident_id" : "1",
"target_link" : "http://localhost/target/12345",
"runbook_url" : "http://localhost/runbook/url",
"recipients" : [
"user1", "user2"
],
"target_labels" : [
"production", "hostname"
],
"details" : "CPU > 50% for 5 minutes",
"state" : "open",
"condition_name" : "test condition",
"target_product" : "productName",
"timestamp" : "123456789000"
]
Was this helpful?