Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,526
Community Members
 
Community Events
184
Community Groups

OpsGenie Webhook Integration with V2 API

Hey folks,

I am migrating New Relic Notification Channels to Workflows and I have a webhook payload for OpsGenie V2 API KEY integration. 

Most of the values are coming through but the hard-coded one is not. I put it in bold. 

In OpsGenie, I wanted this value to be in the Entity Field. How can I do that? How should I put it? I've been wrapping up my head around this, please help :( 

{
"issue_id": {{ json issueId }},
"message": {{ json annotations.title.[0] }},
"details": {
"self_url": {{ json issuePageUrl }},
"state": {{ json state }},
"is_correlated": {{ json isCorrelated }},
"created_at": {{ createdAt }},
"updated_at": {{ updatedAt }},
"activated_on": {{ activatedAt }},
"closed_at": {{#if issueClosedAtUtc}} {{ json issueClosedAtUtc }} {{else}}"None"{{/if}}
},
"incident_ids": "{{#each incidentIds}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"priority": {{#contains "P1" accumulations.policyName.[0]}} "P1" {{else}} {{#contains "P3" accumulations.policyName.[0]}} "P3" {{else}} "P5"{{/contains}} {{/contains}},
"customPriority": {{#contains "P1" accumulations.policyName.[0]}} "P1" {{else}} {{#contains "P3" accumulations.policyName.[0]}} "P3" {{else}} "P5"{{/contains}} {{/contains}},
"appAbbr": "THIS VALUE RIGHT HERE",
"owner": "NewRelic",
"impactedEntities": {{json entitiesData.names}},
"totalIncidents": {{json totalIncidents}},
"state": {{ json state }},
"trigger": {{ json triggerEvent }},
"isCorrelated": {{ json isCorrelated }},
"createdAt": {{ createdAt }},
"updatedAt": {{ updatedAt }},
"sources": {{ json accumulations.source }},
"alertPolicyNames": {{ json accumulations.policyName }},
"alertConditionNames": {{ json accumulations.conditionName }},
"workflowName": {{ json workflowName }}
}

1 answer

1 vote
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 17, 2022

Hi @Joanne Oliveira ,

Do you know whether or not that field is in fact parsing in the payload? You should be able to check the Logs tab for either the Processed incomingData or Received integration request logs.

 

If it is found in either of those logs, then you should be able to use some form of string processing or regex to extract it into the alert. Maybe even something like this might work:

{{appAbbr}}

{{_payload.appAbbr}}

 

You could also try extracting the entire {{_payload}} of the alert into the description field to see if it's found, then use a JSON formatter to help determine exactly what you might need to extract it.

 

Since it's not a field offered by default within the New Relic integration, it would need to be extracted with some form mentioned above.

{{_payload.appAbbr}}

This one worked!

Thank you! 

Like Nick H likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events