Michael
Michael

Reputation: 301

Grafana cannot find database from influxDB Cloud using InfluxQL

I am trying to setup an InfluxDB Cloud data source in Grafana (v 10.2.2) but am unable to locate my databases or buckets.

I am following this example of how to setup the connection but Grafana is giving an error

"database not found: testBucket error reading influxDB"

Here is my grafana configuration:

enter image description here

The bucket definitly exists enter image description here

What am i doing wrong here? When I set this datasource as Flux datasource and give it the appropriate api token, it works fine.

Upvotes: 1

Views: 521

Answers (1)

Markus W Mahlberg
Markus W Mahlberg

Reputation: 20703

As documented: If you want to use the InfluxDB2 instance with InfluxQL, you need to create a DBRP-mapping to your bucket:

  1. Create a DBRP Mapping for your bucket:

    influx v1 dbrp create \
    --db example-db \
    --rp example-rp \
    --bucket-id $YOUR_BUCKET_ID \
    --default
    
  2. Create a V1 Authentication for said bucket

    influx v1 auth create \
    --read-bucket $YOUR_BUCKET_ID \
    --write-bucket $YOUR_BUCKET_ID \
    --username joecool
    
  3. Use example-db, joecool and the password you were prompted for in the second step to connect Grafana to your InfluxDB2 instance which will (more or less) behave like an InfluxDB1 instance.

Upvotes: 0

Related Questions