Installing the Cloudflare Grafana Plugin takes under 5 minutes and is the best way to start exploring your DNS analytics from Cloudflare. The Cloudflare Grafana plugin currently includes DNS and Virtual DNS analytics, and over time will be expanded to include other HTTP and Firewall data.
1. First you will need to have a running version of Grafana.
2. Next use the Grafana CLI to install the Cloudflare plugin.
grafana-cli plugins install cloudflare-app
3. Now when you launch Grafana, you will see Cloudflare for Grafana on the home screen under installed apps.
4. Click on the main Grafana icon in the top right corner and hover over the Cloudflare Plugin row and click on Plugin Config.
5. This will take you to the Plugin Config page. On the Plugin Config page, you will need to enter your email address that you use to login to Cloudflare and your Cloudflare API key. You can find your Cloudflare API key here: https://www.cloudflare.com/a/account/my-account
6. Now that you have configured the Cloudflare Grafana plugin with your account details, you can go to the main menu at the top and choose Cloudflare Grafana App > Zones or Cloudflare Grafana App > Virtual DNS if you are a Virtual DNS user.
Note: If you are running Grafana behind Cloudflare, to use the Grafana Cloudflare App you will need to grey cloud (in the DNS editor) the Grafana subdomain so that it does not route through Cloudflare. Otherwise you will receive the error: "DNS points to prohibited IP".
What can different plans see?
Different Cloudflare plans have access to different levels of data.
Free zones: # of queries per response code
Pro zones: # of queries per colo
Business zones: # of queries per response code and # of queries per record type
Enterprise zones: # of queries per query name
You can upgrade plans in your Cloudflare account dashboard here: https://www.cloudflare.com/a/overview/
Adding new panels with the Cloudflare Grafana Plugin
You can use the Cloudflare Grafana plugin to add your own panels to your Grafana dashboards.
When you are creating a new panel, from Panel Data Source, choose Cloudflare.
Use the following fields
For Virtual DNS:
Use the following fields
Source: Virtual DNS
1. "DNS points to prohibited IP" Error
This means there's a loop created between Grafana and Cloudflare. To fix, you will need to "grey cloud" your grafana dashboard in the Cloudflare DNS dashboard. (i.e. click on the orange cloud next to the DNS entry for the subdomain hosting your Grafana dashboard).