I have two datasources pointing at the same InfluxDB, one using InfluxQL and one using FLUX.
InfluxQL datasource verifies okay when pressing Save&Test in Grafana/DataSources. The FLUX shows a red exclamation mark with the text: Error reading InfluxDB.
When I copy/paste myToken into the Grafana/DataSource/Token field it immediately finds my bucket. How come I am not able to provision the same token?
docker-compose.yml
version: '3.3'
services:
influxdb:
image: influxdb:2.1-alpine
env_file: configuration.env
ports:
- '8086:8086'
volumes:
- influxdb_data:/var/lib/influxdb2
- ./scripts:/docker-entrypoint-initdb.d
grafana:
image: grafana/grafana:8.3.0
env_file: configuration.env
ports:
- '3000:3000'
volumes:
- grafana_data:/var/lib/grafana
- ./Grafana/provisioning:/etc/grafana/provisioning
volumes:
grafana_data:
influxdb_data:
Configuration.env
####################
# InfluxDB options
####################
INFLUXDB_HTTP_AUTH_ENABLED=true
DOCKER_INFLUXDB_INIT_MODE=setup
DOCKER_INFLUXDB_INIT_USERNAME=admin
DOCKER_INFLUXDB_INIT_PASSWORD=admin
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=myToken
DOCKER_INFLUXDB_INIT_ORG=myOrg
DOCKER_INFLUXDB_INIT_BUCKET=myBucket
V1_DB_NAME=DBv1
V1_RP_NAME=RPv1
V1_AUTH_USERNAME=admin
V1_AUTH_PASSWORD=admin
datasource.yaml
apiVersion: 1
datasources:
- name: InfluxDBFlux
type: influxdb
access: proxy
url: http://influxdb:8086
jsonData:
version: Flux
organization: myOrg
defaultBucket: myBucket
secureJsonData:
token: myToken
version: 1
editable: true
Have also tried adding http Authorization header with value> Token myToken
Any tip on where I have gone wrong?