Description
The Cloudflare exporter on prometheus is consistently reporting ~25% fewer requests compared to the Cloudflare Dashboard for the same time periods. This appears to be caused by multiple architectural issues in how the exporter queries and processes metrics.
Environment
- Cloudflare Plan: Pro/Enterprise
- Scrape Interval: 60 seconds
- Scrape Delay: 300 seconds (5 minutes)
Expected Behavior
Prometheus metrics from cloudflare_zone_requests_total should match the "Total Requests" shown in the Cloudflare Dashboard for the same time period (accounting for the 5-minute scrape delay).
Actual Behavior
Prometheus consistently shows ~25% fewer requests than the Cloudflare Dashboard.
Example:
- Cloudflare Dashboard (30-minute period): 192-215 requests
- Prometheus (same period): 150-180 requests
- Discrepancy: ~25-30% missing data
Screenshots
- Total Request of 22.03M between 9:00-9:30
- Total Request of 18.8M-ish between 9:00-9:30 (Via thanos/prometheus)
sum(increase(cloudflare_zone_requests_total{zone="example.com"}[30m]))
*Both data was captured at 10:30 - so this should have given enough time for the scraped metrics to settle in.
Reproduction Steps
- Deploy cloudflare-exporter with default configuration (60s interval, 300s delay)
- Let it run for at least 1 hour
- Compare Prometheus metrics with Cloudflare Dashboard for the same time period:
sum(increase(cloudflare_zone_requests_total{zone="example.com"}[30m]))
- Check Cloudflare Dashboard "Total Requests" for the same 30-minute window (accounting for 5-minute offset)
- Observe ~20-30% discrepancy
Please advise, thank you!
Description
The Cloudflare exporter on prometheus is consistently reporting ~25% fewer requests compared to the Cloudflare Dashboard for the same time periods. This appears to be caused by multiple architectural issues in how the exporter queries and processes metrics.
Environment
Expected Behavior
Prometheus metrics from
cloudflare_zone_requests_totalshould match the "Total Requests" shown in the Cloudflare Dashboard for the same time period (accounting for the 5-minute scrape delay).Actual Behavior
Prometheus consistently shows ~25% fewer requests than the Cloudflare Dashboard.
Example:
Screenshots
sum(increase(cloudflare_zone_requests_total{zone="example.com"}[30m]))*Both data was captured at 10:30 - so this should have given enough time for the scraped metrics to settle in.
Reproduction Steps
sum(increase(cloudflare_zone_requests_total{zone="example.com"}[30m]))
Please advise, thank you!