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

How to parse the subject and the properties from aws cloudwatch payload?

I can't see the value for "Subject" in parsed date for my cloudwatchEvent integration. It shows as null. How can I get the value for "subject" in these alerts.  

OpsgenieParsedDataScreenshot 2022-08-03 133140.png

 

Also, I want to parse the properties like "resources" from the payloads received from aws cloudwatchEvent. Is there any way I can parse any extra properties other than the mentioned above (i.e. reason, deploymentid, eventname, eventtype, source etc.). Subject is also null. Not sure how to parse any value to subject? 

Can someone please help me in resolving the above issue.

awsPayloadScreenshot 2022-08-03 133947.png

 

1 answer

1 accepted

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

Hi @pushpa ,

Not entirely sure why the Subject field is included as a default field parsing in the payload, since it's not included as one in the CloudWatch Events integration:

cw1.jpg

 

Which is why I assume it's sending as null. It is a default field in the other CloudWatch integration, so maybe that's the reason.

 

As for extracting the other fields being parsed in the payload, most customers will use a form of string processing or regex to extract these into the alert.

You might be able to use something like one of these:

{{_payload.reason}}

{{_payload.substringBetween("\"reason\":\"","\"")}} 

Thanks Nick. I tried something like the above.

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

It looks like the resources field parses a bracket which is a different formatting than the reasons field:

cw2.jpg

So the resources field might be something like:

{{_payload.resources}}

{{_payload.substringBetween("\"resources\":[\"","\"]")}}
Like pushpa likes this

Thanks. I was also working on that and just got the things correctly.

Thanks for your help Nick. 

Like Nick H likes this

Suggest an answer

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

Atlassian Community Events