LoadBalancerMonitor
Source:
src/Cloudflare/LoadBalancer/Monitor.ts
A Cloudflare Load Balancing monitor — an active health check (HTTP, HTTPS, TCP, ICMP, or SMTP probe) that Load Balancing pools reference to decide which origins are healthy.
Monitors are account-scoped and have no name field; the description
carries the physical name so lost state can be recovered. All properties
are mutable in place.
Requires the Load Balancing subscription on the account. The allowed
interval range is plan-dependent.
Creating a Monitor
Section titled “Creating a Monitor”HTTPS health check
const monitor = yield* Cloudflare.LoadBalancerMonitor("ApiMonitor", { type: "https", path: "/health", expectedCodes: "2xx",});TCP port check
const tcp = yield* Cloudflare.LoadBalancerMonitor("DbMonitor", { type: "tcp", port: 5432,});Using with a Pool
Section titled “Using with a Pool”const pool = yield* Cloudflare.LoadBalancerPool("ApiPool", { origins: [{ name: "origin-1", address: "203.0.113.10" }], monitor: monitor.monitorId,});