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

AWS SNS integration.

Dmitry Petriev November 17, 2022

Hi, 

 

We are using the following flow: AWS Managed Prometheus connected to AWS SNS (through Alertmanager configuration), and AWS SNS sent an alert to OpsGenie.

 

We have rules in AWS Managed Prometheus that send alerts to OpsGenie; integration works well, but we want additional settings:

1) How can we set tags in OpsGenie alerts that depend on triggered rules?

2) How can we close the FIRING alert after getting RESOLVED alert? Now, OpsGenie creates two issues related to the same alert.

 

I have doubts about this flow because I know that AWS SNS and AWS Managed Prometheus don't have such a flexible setup.

1 answer

1 accepted

1 vote
Answer accepted
John M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 17, 2022

Hi @Dmitry Petriev

Below are answers to your questions:

1) How can we set tags in OpsGenie alerts that depend on triggered rules?

You will need to add multiple 'create alert' actions in the integration's advanced settings. Each 'create' action will have its own unique filters that trigger different tags to be added. Here is a screenshot:

2022-11-17_13-35-21.png

2) How can we close the FIRING alert after getting RESOLVED alert? Now, OpsGenie creates two issues related to the same alert.

The alias on the close alert will need to match the alias on the payload that created the alert. The alias field is what the system uses to match incoming payloads with open alerts, to either de-duplicate them (if they match a 'create alert' action), close them (if they match a 'close alert' action) or complete other actions like 'add note' or 'acknowledge' if the filters match those actions. Keep in mind that incoming payloads are processed against the actions from top to bottom, so if an incoming payload matches a 'create alert' action and there is an open alert with the same alias, it will deduplicate, even if it also matches a 'close' action, because the 'create' actions are processed before close actions - so be sure that your filters are specific and do not broadly match against payloads that they should not be. 

2022-11-17_13-37-27.png

Dmitry Petriev November 17, 2022

Wow, actually, I don't have the such panel for settings. Is it available only on a specific subscription plans?

John M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2022

Hi @Dmitry Petriev

Yes, the advanced settings are available on the Standard and Enterprise plans:

https://www.atlassian.com/software/opsgenie/pricing

Like Dmitry Petriev likes this
Dmitry Petriev November 18, 2022

Thanks, John!

Like John M likes this
Pavel Klyuev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 13, 2022

@John Mbut AWS Alertmanager doesn't send alias key in message into Amazon SNS and Opsgenie get always unique alias on RESOLVED message because payload doesn't have alias key.

 

How could we configure auto-close alerts with that integration path: AWS Prometheus rules -> AWS Alertmanager -> AWS Amazon SNS -> Opsgenie incoming integration with Amazon SNS (HTTPS)

John M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2022

@Pavel Klyuev - You can use any dynamic value or any combination of dynamic values in the alias field - it does not need to contain the {{alias}} value. As long as the incoming payload that created the alert and the payload that will be closing the alert have the same values in those fields, the alert will close. For example, you could use something like the following in the alias fields of both the 'create alert' and 'close alert' actions:

{{subject}} - {{topicArn}}

As long as the above parsed exactly the same on both payloads, it would close the alert. You would want those values to be unique to that individual alert so other alerts are not closing. 

Like Pavel Klyuev likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events