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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Time in alert Alias

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

0 votes
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 02, 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.

Hi @Nick H 

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 H likes this

Hi @Nick H

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 H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 07, 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.

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

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 07, 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.

Hi @Nick H , 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 H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 07, 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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events