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,551,790
Community Members
 
Community Events
184
Community Groups

Parse one tag value from the tags on the New Relic integration message alert fields

Edited

Hi everyone!

I have a New Relic integration in my OpsGenie that works pretty well, with working tags incoming from New Relic. I would like to parse the value of a single tag from my notification channel into the Message field of the integration. Please refer to the screenshots bellow:

Screenshot_20211028_134529.png  Screenshot_20211028_134611.png

How do I parse a single tag value in the yellow highlight above?

1 answer

1 vote
Samir
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 28, 2021

Hi @Alexander Blagus Vital de Souza !

 

Tags is an "array" field in Opsgenie, so that's why the {{tags.statusPageAppName}} option isn't working for you. That only works on key-value fields like Extra Properties.

 

For tags, you can use regex or string processing to parse out a specific tag. For example, you could use {{tags.substringAfter("statusPageAppName:")}}

 

Hope that helps!

 

Thanks,

Samir

That's quite interesting! Thank you very much for the answer and for the reference links! I'll be testing if this works. 

Have a nice day!!

Works like a charm!
I just have to create a better algorithm because the closing braket ("]") is appearing, as expected. I'll refer to the docs to create a refined parser.

 

thank you very so much!

Like # people like this

For the final solution I used Regular Expressions. This one works well with another tags or with just one:

{{tags.extract(/(cmp_)([^\,\:]+)/,2)}}

Screenshot_20211028_162344.png

As seen, I am using the existent cmp_ tags already used for the StatusPage integration.

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events