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

Automatically Acknowledge and Close Alert using Python

Anil Sharma
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!
June 20, 2020

Hi Guys

 

I am going to develop a small program using Python. This program will do the following:

  • GUI having User Name and Password
  • When User enter the User Name and Password. The Program will Log-In to Ops-Genie
  • Check Every 1 minute that any Open Alert exists. If Open Alert exists then Mark this Alert as Acknowledged.

Anyone please guide me How I will do this.

Thanks

1 comment

Samir
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2020

Hi @Anil Sharma - as far as developing the web application, I can't offer much guidance there. But in regard to closing and acknowledging alerts in Opsgenie from Python, you can leverage our Alert API to acknowledge and close alerts from a python script. 

Here is the documentation for the 2 requests...

Close Alert API Request - https://docs.opsgenie.com/docs/alert-api#close-alert

Acknowledge Alert API Request - https://docs.opsgenie.com/docs/alert-api#acknowledge-alert

 

We have found using the "requests" library in Python as a good option for making requests to our API.  

 

Hope that helps!

 

Thanks,

Samir

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events