Dynamic Alert fields for Parameter value in Opsgenie Actions


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

 

Summary

As mentioned in the Parameter types for Opsgenie actions support document, you can pass Dynamic Alert fields as parameters when executing an Action in Opsgenie.
This article highlights the available alert fields that can be passed as Values.

Environment

Opsgenie Cloud

Use Case

It might be required that you would like to pass the alert field value as a parameter when executing actions in Opsgenie or you may want to manipulate the text value of those fields via string processing and then send it as a value for other integration to process.

Solution

Below is a list of alert fields that can be used as Parameter Value:

Alert FieldParameter Value
Message{{message}}
Tags{{tags}}
ID{{id}}
Tiny ID{{tinyId}}
Status{{status}}
Entity{{entity}}
Source{{source}}
Description{{description}}
Actions{{actions}}
Priority{{priority}}
Count{{count}}
Alias{{alias}}
Extra Properties{{extraProperties.*Key*}}

 
You can also use String processing methods in Opsgenie integrations to manipulate the text in the above fields and extract only needed information from them.

Example:

If the Alert has an Extra Property like below, where the Key is 'Host Name' and Value equals to 'The Hostname is: Collaba':

To extract only the host name "Collaba" from the above, we can use string processing for the Extra Properties field as follows: {{extraProperties.Host Name.substringAfter(":")}} which will return all available text after the ":" mark - In this case the word after ":" is Collaba.



In case you have further queries on using Dynamic values for Opsgenie Actions, please feel free to contact support via the Atlassian Support portal.

Last modified on Aug 9, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.