Skip to content

Instantly share code, notes, and snippets.

@kyouheicf
Created September 19, 2023 05:09
Show Gist options
  • Save kyouheicf/7f144342fd5ded6e6c8e497dfb1af9c1 to your computer and use it in GitHub Desktop.
Save kyouheicf/7f144342fd5ded6e6c8e497dfb1af9c1 to your computer and use it in GitHub Desktop.
curl --request POST \
--url https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/alerting/v3/policies \
-H "X-Auth-Email: $EMAIL" \
-H "X-Auth-Key: $APIKEY" \
-H "Content-Type: application/json" \
--data '{
"name": "Magic Tunnel Health Alert",
"alert_type": "magic_tunnel_health_check_event",
"description": "My Magic tunnel health alert",
"enabled": true,
"filters": {
"slo": [ "99.0" ],
"tunnel_name": [ "osaka-mwan","tokyo-mwan" ]
},
"mechanisms": {
"email": [ { "id": "[email protected]" } ],
"webhooks": [{"id":"xxx-xxx-xxx-xxx-xxx"}]
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment