Track DNS performance, traffic patterns, cache efficiency, and threat activity over time.
Category: Monitoring · Auth: API token · Metrics: 25
Prerequisites
You need two things from your Cloudflare account:
- API Token — Go to Cloudflare Dashboard → API Tokens, create a token with Zone Analytics:Read permission.
- Zone ID — Found on the Overview tab of your domain in the Cloudflare dashboard.
Configuration
Go to Settings → Integrations → Cloudflare and enter your API token and zone ID.
[[plugins]]
name = "cloudflare"
entity = "all"
config.api_token = "${CLOUDFLARE_API_TOKEN}"
config.zone_id = "your-zone-id"
Secret values like API tokens can use environment variable references (${VAR}).
Entities
Pull everything with all, or pick specific categories:
| Entity | Description |
|---|
dns | DNS query analytics |
traffic | HTTP traffic metrics |
security | Firewall and threat metrics |
performance | Cache and status code metrics |
all | All of the above |
Metrics
DNS (8)
| Metric | Description |
|---|
dns_queries_total | Total DNS queries (24h) |
dns_queries_uncached | Uncached DNS queries (24h) |
dns_queries_stale | Stale DNS queries (24h) |
dns_response_time_avg | Average DNS response time in ms (24h) |
dns_response_time_median | Median DNS response time in ms (24h) |
dns_response_time_p90 | P90 DNS response time in ms (24h) |
dns_response_time_p99 | P99 DNS response time in ms (24h) |
dns_queries_nxdomain | NXDOMAIN DNS responses (24h) |
Traffic (7)
| Metric | Description |
|---|
requests_total | Total HTTP requests (24h) |
requests_cached | Cached HTTP requests (24h) |
requests_uncached | Uncached HTTP requests (24h) |
bandwidth_total | Total bandwidth in bytes (24h) |
bandwidth_cached | Cached bandwidth in bytes (24h) |
pageviews_total | Total page views (24h) |
visitors_unique | Unique visitors (24h) |
Security (4)
| Metric | Description |
|---|
threats_total | Total threats detected (24h) |
firewall_events | Total firewall events (24h) |
firewall_blocks | Firewall block actions (24h) |
firewall_challenges | Firewall challenge actions (24h) |
| Metric | Description |
|---|
cache_hit_ratio | Cache hit ratio as percentage (24h) |
bandwidth_saved_ratio | Bandwidth saved ratio as percentage (24h) |
status_2xx | 2xx status code count (24h) |
status_3xx | 3xx status code count (24h) |
status_4xx | 4xx status code count (24h) |
status_5xx | 5xx status code count (24h) |