I have configured a close alert Web hook in OpsGenie.
When I receive the Web hook, I immediately fetch the alert’s full data using the OpsGenie API. (because I need some info that doesn't appear in the Web hook)
However, the response still shows the alert status as "open" instead of "closed."
This happens even though the Web hook was triggered for a closed alert.
It seems like there’s a delay in updating the alert status in the API.
Configured a close alert Web hook.
Received a Web hook when an alert was closed.
Fetched alert details using the API
immediately.
The response still showed "status": "open"
instead of "closed"
.
Is there an internal delay between triggering the Webhook and updating the alert status in the API?
Does OpsGenie guarantee that an alert's status is updated before the Web hook is sent?
Would adding a delay before fetching the alert data ensure correctness?
Is there an API parameter to force retrieving the most updated alert status?
Hi @Abdelhadi Nasmane ,
This is Shashwat and Opsgenie and here to help! :)
May I know if you have configured the Close alert action filter to look for specific field values in the incoming payload and auto-close the alert as explained in this help document?
Could you please help me with the close webhook payload being sent for this and a screenshot of the close alert action filter on the Opsgenie API integration level?
Best,
Shashwat
Hi @Shashwat Khare
The problem has been solved by waiting some time (2 seconds) before fetching the alert data (Or just keep fetching until you get a version with status: "close" since we are sure the alert was closed after receiving the close Alert webhook).
So I assume OpsGenie was sending the close Alert webhook, and needed some time before updating the alert fields, however since I was fetching the alert's info immediately after receiving the webhook I was getting an out dated version.
So the problem has been solved.
For your questions:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Abdelhadi Nasmane ,
Yes, this is the correct payload being used for the Close alert action on the Opsgenie side.
I'm glad you were able to implement the 2-second delay so that the async framework works as expected here.
Best,
Shashwat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.