Following the documentation on the provision feature found here.
I have a datasource config file at /etc/grafana/provisioning/datasources/influxdb.yaml
.
The contents of which is the following.
apiVersion: 1
datasources:
- name: InfluxDB
type: influxdb
uid: influxdb
url: http://localhost:8086
editable: true
isDefault: true
version: 1
jsonData:
defaultBucket: speed_tests
httpMode: POST
organization: internet_monitor
version: Flux
readOnly: true
secureJsonData:
token: $INFLUXDB_TOKEN
When I start grafana-server
via systemctl
or delete this datasource and restart grafana-server
.
The InfluxDB datasource is created but the token
is empty and unset.
How can I provide the INFLUXDB_TOKEN
environment variable to the systemd
managed daemon?
I’ve tried setting the value of this variable in /etc/sysconfig/grafana-server
but this hasn’t worked either.
$ cat /etc/sysconfig/grafana-server
INFLUXDB_TOKEN=<REDACTED>