CloudFlare Zone Metrics Exporter
5.2K
The project drives metrics from the CloudFlare graphQL API to Prometheus.
The API exposes sum of metrics for a predefined time window. The time window is approximately one minute.
Metrics need to be aggregated on CloudFlare. There are no metrics exposed for the last minute. The time window starts three minutes back and ends two minutes back.
Run the app:
export TOKEN="<cloudflare_token>"
export ZONETAG="<cloudflare_zone_tag>"
export SUBSYSTEM="<my_org>"
make run
Build the app:
make build
./bin/cloudflare_exporter
The SUBSYSTEM environment variable will be used as metrics subsystem.
Can be used to differentiate metric names for different cloudflare domain zones.
The default SUBSYSTEM is gather_town. Default metric names:
| name |
|---|
| cloudflare_gather_town_browser_map_page_views_sum{family="<browser_family>"} |
| cloudflare_gather_town_country_map_bytes_sum{country=""} |
| cloudflare_gather_town_country_map_requests_sum{country=""} |
| cloudflare_gather_town_country_map_threats_sum{country=""} |
| cloudflare_gather_town_response_bytes_sum |
| cloudflare_gather_town_response_status_sum{status="<status_code>"} |
| cloudflare_gather_town_visits_sum |
All metrics are gauges.
Content type
Image
Digest
Size
3.3 MB
Last updated
almost 5 years ago
docker pull gathertown/cloudflare_exporter