Skip to content

Cloudflare Exporter underreports requests compare to Cloudflare dashboard #167

@soontobemil

Description

@soontobemil

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

Image
  • Total Request of 22.03M between 9:00-9:30
Image
  • 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

  1. Deploy cloudflare-exporter with default configuration (60s interval, 300s delay)
  2. Let it run for at least 1 hour
  3. Compare Prometheus metrics with Cloudflare Dashboard for the same time period:
    sum(increase(cloudflare_zone_requests_total{zone="example.com"}[30m]))
  4. Check Cloudflare Dashboard "Total Requests" for the same 30-minute window (accounting for 5-minute offset)
  5. Observe ~20-30% discrepancy

Please advise, thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions