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

Not receiving created alerts

Hi,

I'm working on implementing opsgenie for the first time, with a new airflow instance. I have been unable to receive alerts so far, even though everything seems to be correctly set up.

I already have my account/team and integrations (slack and api) set. I already configured the opsgenie conection in airflow (using the slack api key as password). An I already added the opsgenie hook to my code.

It all seems to work ok. According to the airflow logs, the opsgenie genie request is correctly sent. I even get responses like this:

Sending 'POST' to url: https://api.opsgenie.com/v2/alerts
<Response [202]>
{'result': 'Request will be processed', 'took': 0.007, 'requestId': '65f2a665-40ea-4173-967e-xxxxxxxxxx'}

If I search for the request id, I get this response:

 

{
"data": {
"success": true,
"action": "Create",
"processedAt": "2023-01-03T16:40:03.08Z",
"integrationId": "xxx",
"isSuccess": true,
"status": "Created alert",
"alertId": "xxx",
"alias": "ECO_OPSGENIE_ALERTS-send_opsgenie_alerts-20230103"
},
"took": 0.004,
"requestId": "65f2a665-40ea-4173-967e-xxxxxxxxxx"
}

However, NO alerts are ever sent, and I can't see them anywhere in the opsgenie alerts section. And of course I also get bothing on slack or on the opsgenie app.

If I create a "manual" alert using the opsgenie app, I do get slack and app alerts... but nothing using the API.

I also tried directly from postman, but same thing: no alerts are sent, even though the response says they were correctly created.

Any idea what could be causing this and how to solve it?

3 answers

1 accepted

2 votes
Answer accepted

I just found the problem... I had to add this to the body of the request:

"responders": [
{
"name": team_name,
"type": "team"
}
]
I had the team_name set in the user field.
Now it's all working!

Hi, @Alain More  I am trying to set up the Airflow connection with Opsgenie as well and trying to test the connection but it cannot connect. can you share with me how you set the connection?

Screenshot 2566-01-05 at 18.05.39.png

 

I put my API Key to the password and put the host with the URI API. Is this correct?

Hi Surawut,

 

Yeah that part is pretty straightforward. Only write a connection_id, set the connection type to HTML and set the API key of your integration into the password field. That's it!

Like Surawut Jirasaktavee likes this

Hi Alain, 

 

Do you put the host url as well? and what the operator you use in your python file?

0 votes
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 04, 2023 • edited

Hi @Alain More ,

If you are using the same body in these requests, it could be the alert is deduplicating. This occurs when the alias of an alert matches the alias of an open existing Opsgenie alert.

You can search your Alerts tab for a query like below to see if there is an open alert with multiple deduplications:

alias: "ECO_OPSGENIE_ALERTS-send_opsgenie_alerts-20230103"

dedup1.jpg

 

Otherwise, you could also search the Logs tab for the request ID or timestamp to see what might be happening as well.

Thanks for your help, seems I was only missing a parameter in the request's body.

Suggest an answer

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

Atlassian Community Events