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,641,914
Community Members
 
Community Events
196
Community Groups

Parse JSON from AWS SNS

Hi! How can I parse messages from AWS SNS in JSON format for getting the "attributes.severity" value?

I have alert manager with next configuration.

Could anyone tell me how OpsGenie parse JSON messages?

Снимок экрана 2022-11-22 в 15.52.48.png

3 answers

2 accepted

1 vote
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 24, 2022

For visibility to Community, we were able to get the priority parsing as expected by using this custom field @Dmitry Petriev already was extracting, but replaced it into the Custom Value to Opsgenie Priority:

prior1.jpg

 

For more on extracting custom fields as well, this Community Article might be helpful for others!

How to Extract Custom Fields and Data into an Alert

1 vote
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 22, 2022

Hi @Dmitry Petriev ,

This article might help on how to extract "P2" into the alert: How to Extract Custom Fields and Data into an Alert

It'd realistically depend on how this field / value is being parsed in the alert's payload. I believe you're sharing what is sending from Alertmanager or AWS, so you'd want to review the Opsgenie Logs tab to get a better idea on what string processing or regex can be used.

I did it, but it doesn't work in the Снимок экрана 2022-11-22 в 17.56.55.pngСнимок экрана 2022-11-22 в 17.56.31.pngway I want. Could you tell me why the priority is still P3, but the value is P2?

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 22, 2022

We'd have to review the entire payload / Logs to provide a reason why this might not be parsing as expected.

Please open a ticket with Opsgenie support so we can review your account: https://support.atlassian.com/opsgenie/

Like # people like this

So, the task became easy: how to parse such part of JSON in extra properties field AWS SNS Integration:

"MessageAttributes" : {
"value" : {"Type":"String","Value":"P2"},
"key" : {"Type":"String","Value":"severity"}

 I need to catch "P2"

{{MessageAttributes.value.Value}} doesn't works

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events