Provisioning¶
Grafana supports managing data sources by adding one or more YAML config files in the provisioning/datasources
folder:
- Each config file can contain a list of data sources that will be updated during start up.
- Grafana updates each data source to match the configuration file.
- It is possible to use environment variable interpolation.
Follow Provisioning Grafana in documentation for examples.
Standalone¶
apiVersion: 1
datasources:
- name: Redis
type: redis-datasource
access: proxy
orgId: 1
isDefault: true
version: 1
url: redis://host.docker.internal:6379
jsonData:
client: standalone
poolSize: 5
timeout: 10
pingInterval: 0
pipelineWindow: 0
editable: true
secureJsonData:
password: $PASSWORD
Sentinel¶
apiVersion: 1
datasources:
- name: Sentinel
type: redis-datasource
access: proxy
orgId: 1
isDefault: true
version: 1
url: redis://cluster.remote:8001
jsonData:
client: sentinel
sentinelName: Test@internal
poolSize: 5
timeout: 10
pingInterval: 0
pipelineWindow: 0
editable: true
Standalone with SSL enabled¶
apiVersion: 1
datasources:
- name: Redis
type: redis-datasource
access: proxy
orgId: 1
version: 1
url: redis://redis.default.svc.cluster.local:6379
editable: true
jsonData:
client: standalone
tlsAuth: true
tlsSkipVerify: true
secureJsonData:
password: $PASSWORD
tlsCACert: "-----BEGIN CERTIFICATE-----"
tlsClientCert: "-----BEGIN CERTIFICATE-----"
tlsClientKey: "-----BEGIN RSA PRIVATE KEY-----"