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:
How do I parse a single tag value in the yellow highlight above?
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!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the final solution I used Regular Expressions. This one works well with another tags or with just one:
{{tags.extract(/(cmp_)([^\,\:]+)/,2)}}
As seen, I am using the existent cmp_ tags already used for the StatusPage integration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.