Cloudflare Docs
Load-Balancing
Visit Load Balancing on GitHub
Set theme to dark (⇧+D)

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.

No code

To find pools with existing notifications in the dashboard:

  1. Log into the Cloudflare dashboard and select your account and domain.
  2. Go to Traffic > Load Balancing.
  3. Click Manage Pools.
  4. On a pool, click Edit.
  5. For Health Check Notifications, check the value is toggled to On and an email address is present in the Notification email address field.
With code

If using the Cloudflare API, check the notification_filter object. Health checks with enabled legacy notifications will have something like:

"pool": {
"healthy": true,
"disable": true
}

You should also pay attention to the 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.

Request
curl -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.