You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi All,
I am receiving an alert from AWS that goes into the message field in OpsGenie and looks like the below:
{"version":"0","id":"random_string","detail-type":"Alarm State","time":"2020-02-09T17:41:15Z","resources":["arn:....."]}
From the message field in OpsGenie I want to grab the arn and place it into the alias field. I've tried using string processing and regex methods to extract the arn but nothing seems to be working. Please see the attached image for the regex method I am using.
I'm assuming that my regex is incorrect but could anyone advise where or even suggest an alternative way to extract the arn?
Thanks!
Hi Brian,
The substringBetween string processing method may be easier to use in this case. You could try something like:
{{message.substringBetween("resources\":[\"arn:","\"")}}
Hi @John M
Tried the above and unfortunately it is still not placing the arn in the alias field. Whenever an alert is created it is still placing a random string as the alias instead of the arn which I believe is due to the fact that the string processing methods we are using above did not find a match and as a result are returning a None value to the field.
Fiddled around with your response to see if I could get anything to appear in the alias field but unfortunately nothing was working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Brian Costello,
Before I posted that, I tested the string processing code I gave you with the exact message field you posted (below) and it worked for me:
{"version":"0","id":"random_string","detail-type":"Alarm State","time":"2020-02-09T17:41:15Z","resources":["arn:....."]}
Can you please post screenshots of the integration settings as well as the exact message you're processing and the string processing code you are using?
Alternatively, you could open a ticket at support.atlassian.com and we can request access to your account so we can take a look at your setup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.