How to configure Cloudflare app in Grafana from code? How to configure Cloudflare app in Grafana from code? kubernetes kubernetes

How to configure Cloudflare app in Grafana from code?


Grafana plugins are provisionable datasources.

The CloudFlare App plugin uses "{{.SecureJsonData.token}}" for X-Auth-Key and "{{.JsonData.email}}"} for X-Auth-Email.

You could provision the Cloudflare app plugin datasource with jsonData and secureJsonData you like to use.

The datasource name is the id given in Cloudflare app plugin plugin.yaml file.

You may configure jsonData and secureJsonData for this datasource in datasources field in values.yaml.

For example,

datasources:   datasources.yaml:    apiVersion: 1    datasources:    - name: cloudflare-app      jsonData:        email: bilbo@shi.re      secureJsonData:        token: extra-tolkien


To update this answer, this plugin began support of API tokens in December 2020. In order to have the Grafana provisioner pick up your token, if you're using an API token instead of the email/API key, you must specify:

    jsonData:      bearerSet: true    secureJsonData:      bearer: "your-api-token"