Cloudflare stats are very useful, but they expire and can’t be tracked over a long period of time. That’s why I developed Cloudflare2DB to log their stats into an InfluxDB database. InfluxDB is a great database engine for collecting metrics over time and works great with Grafana.
To get started, mirror the Github Repository here. You will need an InfluxDB server installed, as well PHP.
Copy the config.json.example file to config.json and open it. Grab your CloudFlare API key from your CloudFlare Settings page. Paste that and your CloudFlare email into the field. Add any websites you want logged to “zones”. Save and close the file and run
. Your CloudFlare analytics will now be accessible from your InfluxDB database!