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
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.
Join now to unlock these features and more
Apps like Heroku and Fivetran don't support rich alerting through the Opsgenie API. Instead, they send emails. Is there a way to parse the subject lines of an email using a regex and extract an alert action and alias?
Here is an example:
Instead of creating two alerts, I'd like to automatically close the first one when the second "[Resolved Alert]" email comes in. A simple regex should be able to separate out whatever comes after the [Brackets] into the alert alias which we could use to auto close the issue. Is there a way to parse that subject line using incoming integrations?
@Zander Otavka you can apply regexes to fields via a string processing method, though in this case it looks like you can use the substringAfter method too, documentation here:
String processing methods in Opsgenie integrations | Opsgenie | Atlassian Support
You can use this to define the Alias field, you just want to be careful to ensure that the subject is going to be unique for each alert, if not you should combine some other variable from the email body (which can be extracted via a string processing regex).