Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to parse or structure OpsGenie Alert Description Field?

Deleted user July 28, 2023

Hi all 

New OpsGenie user here - still get up to speed with everything.

Ive tried searching but its not helped me in my quest so far.

Is it possible to configure some sort of alert message description formatting rules in OpsGenie?

Ive subscribed my team to an infrastructure SNS topic which receives alert messages from Amazon Managed Prometheus. Alerting works fine, however when I open the OpsGenie alert, the description in the alert is almost unreadable .  Ive added a screenshot below (Ive trimmed the image to remove full urls for privacy - apologies if this causes issues). Is there any nice easy way to add in new lines and structure the description by field etc? Struggling to see anything in the documentation.

I hope you can help and thank you in advance for your time.

Kind regards

Andrew

image.png

2 answers

0 votes
Rosa M Fossi August 3, 2023

Greetings @[deleted]  I believe the solution you are looking for is parsing the relevant info out of that payload. I suggest you start by visiting the opsgenie logs your.address.opsgenie.com/settings/log and finding an INFO level event such as Received integration request so you can take a look at the _payload received.   Then you can grab the payload entries and drop them as variables in your description.  

Below is an example payload that is triggered by a CloudWatch Alarm that sends a message to an SNS topic that my OpsGenie HTTPS integration is subscribed to. The info I want out of it is AlarmName, AlarmDescription, AWSAccountId, and StateChangeTime

example-payload.png

 

Armed with that info, I go over to the SNS Integration itself, and insert variables (anything outside the {{ }} brackets is hardcoded:

SNS-integration-create-alert-variables.png

I just created this one today and it's working as expected 

incoming-alarm-alert.png

 

 

Hope that helps :)

Deleted user August 14, 2023

Thank you for your help @Rosa M Fossi 

Apologies for the slow reply - Ive been on annual leave. Ive returned this morning (14th) and spotted your reply in my inbox.

Ill have a look at this now and will update this post with progress or potentially more questions :)

 

Thank you so much for your help :)

 

Kind regards

Andrew

0 votes
Deleted user July 28, 2023

Or does this message structure need to be done on the AWS side somewhere?

Cheers :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events