I am trying to integrate several alerting systems into Opsgenie and they all have their own priority level and multiple variations of the alerts. To save some space in the alerts and keep management of the alerts to a minimum I wanted to see if it was possible to translate a value like "Severity: Critical" from the message into "P1" without using the filter.
I've made a regular expression to return the "Critical|High|Medium|Low" value provided in the email, I just need to convert it to a P1-5 value. Any help is appreciated.
{{ message.extract(/Severity: (.*)/) }}