The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Time in alert Alias

Paweł Grams
August 2, 2022

Hi,

I'm trying to configure e-mail integration in Opsgenie so it will group all alerts matching some criteria in daily "threads". 

In Jira there's a way to use smartvalue {{now.shortDate}} to get today's date. Is there any options to get system to add date in Opsgenie Alias?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 2, 2022

Hi @Paweł Grams ,

There are some extra fields not included with the Email integration by default, but specifically parse in the headers of the payload - including the date:

date1.jpg

 

Since it's nested under the headers, you could use something like this to extract it into the alert:

{{_headers.DATE}}

date2.jpgdate3.jpg

 

As well use some form of string processing or regex to pull only the date, or fine-tune exactly what you need to extract into the alias or other alert fields.

Paweł Grams
August 4, 2022

Hi @Nick Haller 

Thank you for this response. It's great I can access headers data as it will improve our ways of working with Opsgenie a lot!

Thank You!

Like Nick Haller likes this
0 votes
Taha Husain
February 7, 2024

Hi @Nick Haller

I am trying to do something similar in my opsgenie setup, I am using the below code to get the date but it's somehow always returning null value. I tried to put it in alias and as well in the description. Any idea how I can make it work? I just want current_date or the date in the alias when the alert was created. Thank you in advance. 

{{_headers.DATE}}

 

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2024

Hi @Taha Husain ,

My suggestion above is only related to the Email integration. Are you using an Email integration, or another integration?

If you are using another integration - then you would need to review the Logs tab to see if there is a date field that can be extracted from the payload.

If yes - then you may want to connect with Opsgenie support for assistance.

Taha Husain
February 7, 2024

Hi @Nick Haller , sorry I forgot to mention about the integration. I have a AWS SNS integration. Do you have any suggestions for that? Thank you!

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2024

I would suggest reviewing the Logs tab to see if the date is parsing in a field or the payload so it can be extracted into the alert.

Typically we see customers leveraging string processing or regex to extract fields / data into alerts.

Taha Husain
February 7, 2024

Hi @Nick Haller , I tried using string processing functions as well, for eg please see below code. I am still getting null values. If there's something other than this I can talk to the support. 

{{ Timestamp.toDate() }}

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2024

You can connect with Opsgenie support for assistance. They will be able to review your instance, logs, etc. - and provide suggestions. It will also prevent you from having to share any information or screenshots here you do not want publicly available.

TAGS
AUG Leaders

Atlassian Community Events