Grafana cannot connect to InfluxDB

Hello, i am sorry, can you help me please.
I have read a lot but can not find a solution…

  • What Grafana version and what operating system are you using?
    operating system = Ubuntu 18.04
    GRAFANA_VERSION=8.0.1 in docker-container
    INFLUXDB_VERSION=2.0.7 in docker-container

  • What are you trying to achieve?
    I am trying to connect Grafana to InfluxDB

  • How are you trying to achieve it?

  1. Checked InfluxDB settings:
  • 1 user = admin, passw 12345678
  • 1 bucket = my-bucket
  • 1 token = my-secret-token
  1. i have read this instruction
    Use Grafana with InfluxDB OSS | InfluxDB OSS 2.0 Documentation
    tried to set
    Data Sources / InfluxDB
    URL =
    Custom HTTP Headers:
    Header = Authorization
    Value = my-secret-token
    Database = my-bucket
    user = admin
    password = 12345678
    HTTP Method = get

also i tried to ping from docker with grafana Ping ok.
and netcat NC ok.

  • What happened?
    InfluxDB Error: Bad Request

  • What did you expect to happen?
    Grafana is connected to InfluxDB

Have you checked that you can connect and authenticate to Influx using the
above credentials from the influx command line interface, quite independently
of Grafana?


Can you please help and explain what command i must enter to check my connection to influx?

When i in influx-container tried this
influx auth list -u admin -t “my-secret-token” this worked.

07ab09e1976e4000 admin’s Token my-secret-token admin 07ab09e1826e4000 [read:authorizations write:authorizations read:buckets write:buckets read:dashboards write:dashboards read:orgs write:orgs read:sources write:sources read:tasks write:tasks read:telegrafs write:telegrafs read:users write:users read:variables write:variables read:scrapers write:scrapers read:secrets write:secrets read:labels write:labels read:views write:views read:documents write:documents read:notificationRules write:notificationRules read:notificationEndpoints write:notificationEndpoints read:checks write:checks read:dbrp write:dbrp]

When i returned to my main system this command is not working also in grafana
influx: command not found

Also i tried in main system:
i have json answer
|message|unauthorized access|

and tried this in main:
curl -G ‘http://localhost:8086/query?pretty=true’ --data-urlencode “db=my-bucket” --data-urlencode “q=SELECT “value” FROM “cpu_load_short” WHERE “region”=‘us-west’;SELECT count(“value”) FROM “cpu_load_short” WHERE “region”=‘us-west’” -u admin -t “my-secret-token”
first it asks question: Enter host password for user ‘admin’:
i entering 12345678
answer: {“code”:“unauthorized”,“message”:“Unauthorized”}

Flux query accepted InFluxQL not

InfluxQL supported only in InfluxDB 1.x
2.x only Flux

that is why i cannot connect to InfluxDB by InfluxQL