Health monitor notifications
Cloudflare is migrating the notifications used by load balancing health monitors to use Cloudflare’s centralized Notifications Service.
What is changing and why?
Cloudflare’s account-level Notifications Service is now the centralized location for most Cloudflare services. This change promotes consistency and streamlined administration, as well as gives you more options for notification delivery such as configuring webhooks or associating multiple pools with the same notification. These new notifications will also be managed at the account level instead of the zone level.
We strongly encourage all customers to migrate existing Health Monitor notifications to Cloudflare’s centralized Notifications Service to avoid lapses in alerts.
Migration guide
Step 1 - Find existing notifications
First you should determine which pools are using notifications. To find pools with existing notifications in the dashboard: If using the Cloudflare API, check the You should also pay attention to the No code
With code
notification_filter object. Health checks with enabled legacy notifications will have something like:notification_email parameter. Even if the notification_filter indicates that health checks should send notifications, those will only be sent if an email address is present in notification_email.
Step 2 - Create new notifications
No code
On the pool you located in Step 1, look for Pool Notifications. Click Create a Health Alert to start creating a notification.
With code
If using the Cloudflare API, create a new notification with the following parameters specified:
"alert_type": "load_balancing_health_alert",
"filters": { "pool_id": <<ARRAY_OF_INCLUDED_POOL_IDS>>, "new_health": <<ARRAY_OF_STATUS_TRIGGERS>> ["Unhealthy", "Healthy"], "event_source": <<ARRAY_OF_OBJECTS_WATCHED>> ["pool", "origin"]
}
Step 3 - Remove deprecated notifications
No code
Once you created your new notification in Step 2, you will return to the pool you were editing previously. To disable the deprecated notifications, toggle the Health Check Notifications on your pool to Off.
With code
If using the Cloudflare API, we recently added a PATCH endpoint so you can easily remove email notifications from multiple pools at the same time.
Requestcurl -X PATCH "https://api.cloudflare.com/client/v4/accounts/:account_identifier/load_balancers/pools" \-H "X-Auth-Email: user@cloudflare.com" \-H "X-Auth-Key: REDACTED" \-H "Content-Type: application/json" \--data '{ "notification_email":""
}'This API call supports the standard pagination query parameters, either limit/offset or per_page/page, so by default it only updates the first 25 pools listed. To make sure you update all your pools, you may want to adjust your API call so it loops through various pages or includes a larger number of pools with each request.