2

I have updated my Influx database and also mapped the databases. But now I get the following problem in Grafana:

  • InfluxDB Error: default retention policy not set for database
  • InfluxDB Error: not executed

What could be the reason? I get the values via Flux without any problems. However, I would like to continue using InfluxQL

OlKo
  • 23
  • 3

2 Answers2

1

In order to continue using InfluxQL you will need to setup the Database/Retention Policy mapping for your new 2.x buckets, so that InfluxQL can treat them like 1.x databases. Have you done this already?

mhall119
  • 522
  • 2
  • 3
1

Docs to refer: https://docs.influxdata.com/influxdb/cloud/query-data/influxql/dbrp/#create-dbrp-mappings

Example:

influx v1 dbrp create --default --bucket-id 520047e21111111 --db telegraf --rp default

I think you may change default to autogen (last parameter). I used default as it is used by Grafana 9? (Not confirmed). You see this in your error message:

InfluxDB Error: default retention policy not set for database

Of course you need create such mapping for each bucket you have.


Maybe you will find it also useful example connection Grafana 9.1 -> Influx 2.4.

enter image description here

See Configure InfluxDB authentication:: https://docs.influxdata.com/influxdb/v2.1/tools/grafana/?t=InfluxQL

In this format you need to pass Authorization header. With space in it!

Token y0uR5uP3rSecr3tT0k3n

You can generate token in Influx web GUI (it will be long and i think Base64 encoded?)

enter image description here

Gelldur
  • 11,187
  • 7
  • 57
  • 68