Confusion about influx versions

Hi there,
I am a little confused about the whole influx-grafana version setting.
If I read correctly, Flux (=influxv2 query language) is not supported fully by grafana. I tried that, it would not let me pick any measurements. You have to enter some code there. Thats a no-go for me.
On the other hand, using influxQL (influxv1 query language) in grafana does come with some Gui, but is deprecated. Can you please point me towards which versions to use ?

What do I pick in the binding ? v1 or v2 ?
Which influxDB would I install (using docker). Can I use the most current v2.x ?
How would I configure access ? Token or password ? Password blank ?

Got it.

  • Apparently you tick v2 in the openHab binding.
  • You install the influxDB (e.g. docker). This would also be a 2.x version. In there (localhost:8086) you create a bucket and set the retention time. Generate a token too.
  • Then set up grafana, create a influx input soucre, use the token.
  • Then use the token to configure the openHab binding. You can either use the MainUI or the services/influx.cfg file.
  • In the MainUI, set the log to trace (right in the binding properties at the bottom) and check the log if influx is actually storing data.
  • now you can create the data. Unfortunately, Grafana has no builder for the new query languge that is used from influxv2 onwards. It is called Flux. But there is a trick. If you go to the Influx WebUI, they have an explorer. Use it, and when you are done, click on editor. You will find the syntax for your query. Copy it and use it with Grafana.
    Please note that the webUI is only available if you installed influxDB yourself, e.g. as docker or so… The openHab installation does not come with UI.

my services/influxdb.cfg looks like this

# Server and Port
# use a token. Do not escape any characters.
# user or organization
# database or bucket
#normally this is set with the bucket
# leave blank.
1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.