lablabs / cloudflare-exporter

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

Missing `cloudflare_zone_requests_status` metrics #95

Open PierreBart opened 1 year ago

PierreBart commented 1 year ago

Hello,

Since the 21st of June 2023, the exporter no longer returns data points for the metrics:

Other metrics such as cloudflare_zone_requests_origin_status_country_host or cloudflare_zone_requests_status_country_host are working fine. I am using the Enterprise plan in Cloudflare.

I see no logs in the exporter that could give more details. I tried restarting the exporter, using a new token, but it hasn't fixed the issue.

Do you have any idea on how to fix this issue?

tomich commented 1 year ago

Question. Is there a free tier zone in your account? I can reproduce what yuou describe on one of my work accounts that has free and non free zones in the same account.

It may be related to https://github.com/lablabs/cloudflare-exporter/issues/32

where

If you have only free_tier zones--> This exporter does not work. If you have SOME free_tier zones and you have issues--> You may declare your NON free tier zones in CF_ZONES and get metrics of PRO/Enterprise plan. If you have only PRO/Enterprise zones--> Exporter works.

Try setting CF_ZONES explicitly and check if you get data that way.

PierreBart commented 1 year ago

@tomich, I do have Free and Enterprise zones in my account.

My issue is that the exporter only reports the following metrics:

  1. cloudflare_zone_colocation_edge_response_bytes
  2. cloudflare_zone_colocation_requests_total
  3. cloudflare_zone_colocation_visits
  4. cloudflare_zone_firewall_events_count
  5. cloudflare_zone_requests_origin_status_country_host
  6. cloudflare_zone_requests_status_country_host

So it does not provide all the metrics listed here: https://github.com/lablabs/cloudflare-exporter#list-of-available-metrics

I have tried setting CF_ZONES explicitly but it doesn't change anything.