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

Auto close Cloudflare healthcheck webhook alert

Simon Kulessa January 12, 2023

Hi,

I've been trying to set up the auto close feature for incoming webhook alerts (cloudflare healthcheck) for some days now.

Current situation: Incoming alerts are working and trigger an alert in opsgenie, which is fine. But when cloudflare sends the "Ok" (or fixed) message, the alert does not get closed. When we started implementing the alert webhook, we even got the "Ok" message as an alert, this was later fixed with a filter for creating alerts like this:

Bildschirmfoto 2023-01-12 um 14.59.51.png

After reading through some posts like this one (https://community.atlassian.com/t5/Opsgenie-questions/Auto-Close-Dynatrace-alert/qaq-p/1957126) and the documentation, my approach was to change the alias of the alert. So I set up a regex to change the alias to the unique ID of the healthcheck. 

Bildschirmfoto 2023-01-12 um 15.00.08.png

But this doesn't seem to close the alert when the issue is resolved in cloudflare. Can we check on Opsgenie side, if the incoming webhook gets the "Ok" message from cloudflare? In cloudflare everything is set up to send the corresponding healthy/unhealthy messages.

Thanks in advance,

Simon

 

1 answer

1 vote
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2023

Hi @Simon Kulessa ,

Important to note that our alert API uses a slightly different URL to close an alert vs. when creating an alert. You can review the format / parameters needed here: https://docs.opsgenie.com/docs/alert-api#close-alert

As you can see, an identifier is required in the URL (even if you have the action set to Match All Alerts, and the alias is matching). The alias can be used as the parameter - but again would be required to close an alert.

Simon Kulessa January 16, 2023

Hi Nick,

thanks for your quick reply. 

So it seems, that cloudflare has no option to get the identifier of an alert that has been created. We are using the webhook for 32 different healtchecks. 

So it seems to me, that we are unable to use one webhook for every "healthy" status (so to close the alert), but we would need to create a unique webhook for every "alias"?

Best,
Simon

Suggest an answer

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

Atlassian Community Events