Thanks to the support docs and other questions here, I've made great progress in using message.extract to populate tags and extra properties fields. But I have one situation where I'm failing to extract data, my property is always blank. I'm guessing it has to do with line breaks, since my other extracts were always from a single line. I've looked at the alert from the web UI, and also exported via API, and I have regex that will match either format, but it's still not matching.
My extract string:
Description when pulled via API:
Test of regex string:
Thanks in advance for any tips!
Hey there Allen,
Thanks for writing into Opsgenie Community, I'm Talar from the Atlassian team, happy to help.
In this instance, it would be worth trying the .removeAllWhitespace() command to see if that will help return the string required.
Regards,
Talar
Thanks!! This would go before the extract I assume? so {{ message.removeAllWhitespace().extract(/<regex>/) }}
EDIT: this might get me closer, but some of the strings I'm trying to capture will have spaces. Is there a way to see the Description / Message field, formatted in the same way as the regex engine 'sees' it?
EDIT: either way, my regex still isn't working
{{ message.removeAllWhitespace().extract(/SEARCHSTRING(.*)RULEREASON/) }}
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure - you can see how the payload in the Opsgenie Logs. To do this:
If you do need more specific assistance here could I recommend putting in a support ticket so we can look at your payload and advise accordingly?
Regards,
Talar
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.