cloudflare-exporter icon indicating copy to clipboard operation
cloudflare-exporter copied to clipboard

Missing cloudflare_* metrics

Open szandala opened this issue 3 years ago • 7 comments

Greetings, despite different configuration I am mising the actuall cloudflare metrics. I have only:

promhttp_*
go_*
process_*

Tested with all 0.06-latest versions with CF_ZONE= anv and without.

What is wrong?

szandala avatar Jan 30 '22 18:01 szandala

I had the same issue initially, but it started working once I set FREE_TIER to false (will require a paid account obviously). From the code it seems it only returns worker metrics if FREE_TIER is set to true. So if you don't use workers like me, you won't see any CF metrics. https://github.com/lablabs/cloudflare-exporter/blob/1df59e2815a23d44bd7a13edad3215adcfd95178/prometheus.go#L202-L204 https://github.com/lablabs/cloudflare-exporter/blob/1df59e2815a23d44bd7a13edad3215adcfd95178/prometheus.go#L228-L230

CharlieC3 avatar Feb 12 '22 14:02 CharlieC3

OK so basically this program is useless for free accounts when not using workers, right?

raspbeguy avatar Mar 27 '23 14:03 raspbeguy

Yes as described here https://github.com/lablabs/cloudflare-exporter/issues/66

onedr0p avatar Mar 27 '23 15:03 onedr0p

I have this problem too. The cloudflare_worker_* metrics show up, but the cloudflare_zone_* metrics are missing.

I have FREE_TIER unset (so it defaults to false) and I am connecting to an account thta has a mixture of free and enterprise zones

What is extra weird, is that when I test this on my local machine by running the exporter in docker, it works perfectly. The coudflare_zone_* metrics appear. But when I run it in a k8s cluster (my production environment) I only get the cloudflare_worker_* metrics, nothing else.

I am using the exact same CF_TOKEN and the exact same CF_ZONES list for both local and k8s tests

james00002 avatar Apr 19 '23 19:04 james00002

Question: Is everybody else here who is experiencing this problem also using the helm chart deployment? I think I am using the latest helm chart, but the image it deploys has a cloudflare-exporter binary from 2021.

The docker deployment method (which definitely has the latest cloudflare-exporter) does not exhibit the same problem of missing zone metrics.

james00002 avatar Apr 21 '23 19:04 james00002

Question: Is everybody else here who is experiencing this problem also using the helm chart deployment? I think I am using the latest helm chart, but the image it deploys has a cloudflare-exporter binary from 2021.

The docker deployment method (which definitely has the latest cloudflare-exporter) does not exhibit the same problem of missing zone metrics.

Yeap, this helped to investigate the issue - helm chart (chart version 0.1.9) had image tag locked at 0.0.9, overriding it to latest or 0.0.14 did the trick. Thx!

Stazis555 avatar Apr 27 '23 15:04 Stazis555

Definelty related to https://github.com/lablabs/cloudflare-exporter/issues/32 . This exporter does not work with free tier at the moment. Also if one of your zones is free and the others are not and nothing is showing up, you may manually declares paid zones in CF_ZONES avoiding the free ones and get metrics that way

https://github.com/lablabs/cloudflare-exporter/issues/32

tomich avatar Aug 25 '23 20:08 tomich