lablabs / cloudflare-exporter

Prometheus CloudFlare Exporter
Apache License 2.0
315 stars 104 forks source link

Some metrics are stopped when env added to values.yaml #135

Open ynsdll opened 1 month ago

ynsdll commented 1 month ago

I just want to change SCRAPE_DELAY. I think that long scrape intervals occurs wrong metrics. When ı compare total requests between cloudflare analytics dashboard and cloduflare exporter for last 30 minutes, there is a difference between them. Cloudflare exporter shows 420K total requests, cloudflare dashboard analytics shows 510K total request.

When I add SCRAPE_DELAY env to values.yaml, exporter only reports the following metrics:

cloudflare_zone_colocation_edge_response_bytes
cloudflare_zone_colocation_requests_total
cloudflare_zone_colocation_visits
cloudflare_zone_firewall_events_count
cloudflare_zone_requests_origin_status_country_host
cloudflare_zone_requests_status_country_host

Other metrics is stopped to report by exporter. Some of them is below;

cloudflare_zone_bandwidth_content_type
cloudflare_zone_requests_total
cloudflare_zone_uniques_total
cloudflare_zone_requests_country

values.yaml

service:
  type: ClusterIP
  port: 8080
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "8080"
  addPrometheusScrapeAnnotation: true

env:
  - name: SCRAPE_DELAY
    value: "60s"

secretRef: cf-api-token

nodeSelector:
  com/workload: platform

tolerations:
  - key: com/workload
    value: platform
    effect: NoSchedule
    operator: Equal

if I remove env from values.yaml exporter start to report all metrics but there will be an inconsistency between Cloudflare analytic dashboards and Cloudflare exporter