Monitors
A monitor issues health checks at regular intervals to evaluate the health of an origin pool. When a pool becomes unhealthy, your load balancer takes that pool out of the server rotation.Health checks that result in a status change for an origin server are recorded as events in the Load Balancing event logs.
Properties
For an up-to-date list of monitor properties, refer to Monitor properties in our API documentation.
Create monitors
For step-by-step guidance, refer to Create monitors.
Health check regions
When you attach a monitor to a pool, you can select multiple regions to increase reporting accuracy.
For each option selected in a pool’s Health Check Regions, Cloudflare sends health checks from three separate data centers in that region.
If the majority of data centers for that region pass the health checks, that region is considered healthy. If the majority of regions is healthy, then the origin itself will be considered healthy.
Increased origin strain
Because of how Cloudflare checks health from multiple regions, adding multiple regions — or choosing to check health from All Data Centers — can send a lot of traffic to your origin.
The same problem can occur when setting low values for a monitor’s Interval.
Host header prioritization
When a load balancer runs health checks, headers set on an origin override headers set on a monitor. For more details, refer to Override HTTP Host headers.
API commands
The Cloudflare API supports the following commands for monitors. Examples are given for user-level endpoint but apply to the account-level endpoint as well.
Command | Method | Endpoint |
---|---|---|
Create Monitor | POST | accounts/:account_id/load_balancers/monitors |
Delete Monitor | DELETE | accounts/:account_id/load_balancers/monitors/:id |
List Monitors | GET | accounts/:account_id/load_balancers/monitors |
Monitor Details | GET | accounts/:account_id/load_balancers/monitors/:id |
Overwrite specific properties | PATCH | accounts/:account_id/load_balancers/monitors/:id |
Overwrite existing monitor | PUT | accounts/:account_id/load_balancers/monitors/:id |
Preview Monitor | POST | accounts/:account_id/load_balancers/monitors/:id/preview |