Build Alerts from SQL Queries: Cloudflare Monitors (Beta) Is Here!
Hi everyone, Shii-chan here! Cloudflare just made alerting a lot more flexible, so let's dig in.
Cloudflare ChangelogWhat was announced?
The Cloudflare Changelog announced Monitors (Beta) in the Alerts section. It's a dedicated space for creating alerts based on your own SQL API queries. You'll find it in the Cloudflare dashboard under Observability > Alerts > Monitors.
Why it matters
Cloudflare notifications have mostly been pre-defined ones, such as DDoS, SSL/TLS, and Health Checks. With Monitors you define the signal you care about as a query, so you can build alerts around what matters to your own service.
What changes
- You can say "tell me when this query result looks like this" using your own metrics
- A visual builder is included, so you can get started even if SQL isn't your strong suit
- The pre-defined notifications now live separately under Platform Notifications
Dive Deep
Each monitor evaluates a query against a supported SQL API dataset on a schedule and sends a notification when the result meets your detection criteria.
There are three detection methods:
- Threshold: triggers when a query result crosses a fixed value
- Anomaly detection: triggers when a result deviates from its historical baseline by more than a configured sensitivity
- SLO: triggers when the ratio of successful events to total events drops below a target percentage
The monitor builder includes:
- A visual query builder
- Custom SQL support
- A query preview that charts the signal over a configurable time range of up to 7 days
Wrap-up
- Monitors (Beta) lives under Observability > Alerts > Monitors
- It runs your SQL API queries on a schedule and notifies you when conditions are met
- Detection: Threshold, Anomaly detection, or SLO
- Pre-defined DDoS, SSL/TLS, Health Checks, and other notifications moved to Platform Notifications
If you want to watch your Cloudflare data with your own metrics, this Beta is for you!