Influxdb 2 on a docker container + OH 4 (SOLVED)

Hi all,

Is there any “how-to” configure influxdb 3 on a docker container?

Thanks
Andrea

I’m sure the company that makes InfluxDB has docs and tutorials.

Community edition is not yet released :slight_smile: so you’ll have to wait

1 Like

You are correct, I was thinking about “2”, not “3” :slight_smile: I’m migrating my system, and I see the next version will be the third, but not yet released. So I think to move forward with the second version.

Do you know if there are ENV that can be useful for OH? I saw especially the security has been optimised

For InfluxDB 2 see docker documentation:
https://hub.docker.com/_/influxdb
and of course

1 Like

InfluxDB 2 is very different in question of communication, there is a configuration parameter for version when setting up InfluxDB connection in openHAB.

Version 2 is using Flux, which is completely different to the version 1 query language, and Flux is already deprecated and will be gone in Version 3 :frowning:
But… Version 2 has a web UI which assists in creating the queries (simply copy and paste the generated code to grafana… nice)
And it’s not getting any better if you want to edit (delete some) data manually.

So there are pros and cons to migrate or not :slight_smile: but, well, it’s InfluxDB…

Mmm … considering I’m moving from one NAS to another, and I need to create from scratch everything, do you think InfluxDB 2 is so nicer than 1 that makes sense to do the upgrade? I see the web interface in InfluxDB 2, I can’t even create a new user, so perhaps this is not the web interface I was waiting for :slight_smile:

But you don’t need real users in the first place (well, other than the admin user).
Create a bucket, create an organisation, then create api tokens for all use cases (openHAB will get another api token than grafana for instance)

The bucket is the db itself?

The bucket is about the retention policy and the data, so yes, it’s equivalent to the db

Mmm, regarding influxdb.cfg, if I understand well, the config should be something like:

db= <your_organization>
retentionPolicy= <your_bucket>
token= <the token you defined for accessing r/w the bucket>
url= Ip:8086

It should be enough, right? Or do we need to put also the “database user”? What is that, the super-user?

Don’t forget version=V2 :slight_smile: quick note for who, like me, is moving from old config to the new one :slight_smile: Now it works like a charm :slight_smile:

Yes, as I did the configuration via UI, I had to check it first on my test system, and now you did it already yourself :slight_smile:

1 Like

InfluxDB 2 is very simple, and very easy to be implemented :slight_smile:

1 Like