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,300,023
Community Members
 
Community Events
165
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 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
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

10 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you