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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,557,897
Community Members
 
Community Events
184
Community Groups

OpsGenie Alerts API Integration

Devin McElheran
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!
May 05, 2023

Hi,

I'm writing some PowerShell for alerting purposes. I can create an alert. I can retrieve that alert using the alias, ID, and tiny ID, all working, so I know that my URLs are being encoded properly.

The problem is that I'm unable to close the alerts. I've tried a few different closure rules like `message contains "Resolve"` or `actions contains "Resolve"` to see if that would do the trick, but none seem to be working. I get the 202 "Request will be processed" response, which I understand is the default response when the request goes into the queue, but the alert doesn't close. I don't see anything coming up in the activity log for the alert, which would lead me to believe that the closure request isn't matching the alert.

If the URL encoding is right for getting alerts, it should be right for closing alerts. I'm using the PowerShell `Invoke-RestMethod` cmdlet, which takes care of encoding URLs. That would leave the URL content, which I've copied from the documentation, but that isn't producing any errors in the response for alias, ID, or tiny ID, leaving me assuming it's also right.

So, I'm kind of at a loss without any additional feedback. Is there a way to follow up on the requestId that's returned after submitting the closure request?

Thanks,

Devin

1 answer

0 votes
Shashwat Khare
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 08, 2023

Hey @Devin McElheran ,

Thank you for elaborating on the issue in such detail :) 

From the above description, it looks like the Close Alert action filter is not processing the alert closure as per the filter setup, as you have rightly mentioned.

To effectively investigate why the alerts are not closing, could you please log a support ticket with us using the link below:
https://support.atlassian.com/contact/#/

We will investigate a sample Alert's audit log to understand why the action filter isn't working on them.

Best,
Shashwat

Devin McElheran
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!
May 08, 2023

Hi @Shashwat Khare

I ended up figuring it out, sort of. The alert would not close based on any criteria I configured, so I removed the configuration altogether and created a new one that matches all. That fixed it for me. Given that I have closure logic on the other end, I'm not too concerned given that it's the API and not just an email alert.

Thank you for your assistance.

Like Shashwat Khare likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events