Installation & configuration
This document outlines configuration options for the Cloudflare data source plugin.
Configuring the Cloudflare plugin is a two step process:
- Installing the Cloudflare plugin
- Configuring the Cloudflare data source
Installation
To see the detailed instruction on how to install a plugin in Grafana, see Install Grafana plugins.
Installing on Grafana Cloud
To install the Grafana Cloudflare data source plugin in your Grafana Cloud instance, navigate to the installation section of the Grafana plugin catalog page. Locate your instance name and click the Install button.
Installing on a local Grafana
There are multiple ways to install the Cloudflare data source plugin in your on-prem/local Grafana instance.
Installing with Grafana CLI
Use the grafana CLI tool to install Cloudflare from the command line:
grafana cli plugins install grafana-cloudflare-datasource
Installing via zip file
Alternatively, you can manually download the .zip file for your architecture and unpack it into your Grafana plugins directory. To download zip files, visit Grafana plugin catalog page and you can find the zip files for the relevant architecture.
Install using Docker
With Docker, you can install the plugin using the following command. This will download the latest published version of the plugin from Grafana plugins directory.
docker run -p 3000:3000 -e "GF_ENTERPRISE_LICENSE_TEXT=$GF_ENTERPRISE_LICENSE_TEXT" -e "GF_INSTALL_PLUGINS=grafana-cloudflare-datasource" grafana/grafana-enterprise:main
Configuration
Once you installed the Cloudflare plugin, you need to configure it. For general information on adding a data source see Add a data source. Only users with the organization administrator
role can add data sources.
Configuration options
Set the cloudflare data source’s basic configuration options:
Name | Description |
---|---|
Name | The data source name. This is how you refer to the data source in panels and queries. |
Default | Default data source means that it will be pre-selected for new panels. |
API Key | API key for accessing the Cloudflare API. |
Cloudflare API key
In order to use the Cloudflare data source plugin, you need to supply the Cloudflare API key to Grafana data source plugin. You can obtain a Cloudflare API key with the instructions provided by the Cloudflare documentation.
When providing permissions, It is very important that you provide only the read permissions to the Cloudflare resources. To know more about the permissions, visit the Cloudflare documentation.
Provisioning
If you want to provision your Cloudflare data source via Grafana provisioning feature, use the following settings:
apiVersion: 1
datasources:
- name: Cloudflare
type: grafana-cloudflare-datasource
secureJsonData:
cloudflare.token: <YOUR_CLOUDFLARE_API_KEY>