i migrated from Influx 1.x to 2.1.1. which has a total different structure.
Is there still a possibility to connect via InfluxQL to DB 2.x ?
Why am I asking ? Because A L L my plots now are empty and I have to change all of them manually if I have to use FLUX instead of QL !
An answer is highly appreciated
Looks like you are surprised (and not in a good way) at what happened when you selected Flux in this dialog box? Can you go back and change it?
FWIW, as complicated as Flux looks, it’s not that bad if you use the InfluxDB Data Explorer to build the query using their GUI (using checkboxes and such). Then, when you have the results you want, toggle to the Flux editor mode and it’s just a matter of copying / pasting the Flux query into Grafana.
I am not really surprised that FLUX works differently.
My problem is that I CANT CONNECT ANY LONGER with InfluxQL to my Influx2 DB ! It seems only to be possible with FLUX now.
There my question hoot to connect with QL to Influx2 ???
If there is a way I have still all my plots available that would be great !
Does the dialog box that I showed appear in your Data Sources?
Yes I have this dialog box
If you have that dialog box, but changing the selection to InfluxQL does not make your graphs re-appear, then I afraid you went down a one-way path by choosing Flux and it wiped out your InfluxQL queries. I believe you will either have to rebuild your graphs using InfluxQL or Flux (your choice).
No, it is a bit different:
Putting the system to InfluxQL I DO NOT get a connection ti my Influx2 !
It always says bad request. The question is how I have QL to configure to connect now to InfluxDB 2 ??? There is not documentation about that.
OK, so there may be some hope, but like you said, it’s not well documented anywhere.
In InfluxDB 1.x, data is stored in databases and retention policies. In InfluxDB OSS 2.1, data is stored in buckets. Because InfluxQL uses the 1.x data model, a bucket must be mapped to a database and retention policy (DBRP) before it can be queried using InfluxQL.
This thread has a lot of back and forth, but in the end they get it working.
I tried it already but without any success it always comes: Bad Request
The thing is that I want to connect to a Influx2 database and why to use a mapping for influx v1 ??? This all is not working for me
I don’t Know what to do
If you already fall in big troubles please consider migration InfluxQL → VictoriaMetrics (GitHub - VictoriaMetrics/VictoriaMetrics: VictoriaMetrics: fast, cost-effective monitoring solution and time series database). It doesn’t support FluxQL neither InfluxQL, but:
- has much better performance
- supports Influx protocol for incomming data
- uses MetricsQL (MetricsQL · VictoriaMetrics) which is extended PromQL
If you find VictoriaMetrics is not for you, you may try to translate you InfluxQL queries to FluxQL using deprecated influx transpile (influx transpile | InfluxDB Cloud Documentation)
This option is for 1.8.x version, which supports both QL, I mean InfluxQL and FluxQL. As far as I know 2.x.x supports only FluxQL.
I think the issue is the authentication method.
InfluxDbB 1.x uses user name and certificates. and InfluxQL
If you switch to INflux DB 2.x it uses an API Token to connect.
The api token would be generated in Influx DB and pasted in your Grafana Influx DB settings
Using influx cli, you can convert buckets to x-db and x-rp
Dont you have a backup of your old db?
There appears to be a bug in Grafana with the influxQL datasource. I had the same issue, and reverted to Grafana version 9.0.6 which works.