Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request/idea: InfluxDB2 support #57

Open
vallittu opened this issue Apr 28, 2021 · 3 comments
Open

Feature request/idea: InfluxDB2 support #57

vallittu opened this issue Apr 28, 2021 · 3 comments

Comments

@vallittu
Copy link

Describe the feature you'd like to have implemented
Support for InfluxDB2
InfluxDB2 has a new java client library, a bit different internal structure with organizations and buckets, and a new connection setup which uses access token instead of username/password.

Describe alternatives you've considered
Alternative is of course continue using v1.x, which works perfectly fine.

Do you want to implement this feature?
I kinda already did

Additional info
I decided to see if I can make a db converter and connector with the new java client library, and it seems to run now. I used as much the same structure as possible with the existing InfluxDBConnector and Converter, and then added new configuration items for v2 support.

I did this only to see if I could still write something, as I haven't really programmed anything in a very long time. Anyway, if this would be useful in anyway, I could for once contribute something back

@ElektroVirus
Copy link

This feature would be quite neat. Fortunately InfuxDB 2 has also implemented a compatibility layer for older applications which only support InfluxDB 1: https://docs.influxdata.com/influxdb/v2.1/reference/api/influxdb-1x/.
I have already migrated my RuuviCollector data into InfluxDB 2.1 and I really like it.

@Scrin
Copy link
Owner

Scrin commented Feb 3, 2022

For an immediate InfluxDB 2.x compatible setup I would recommend switching to my "2nd generation" setup consisting of RuuviBridge and either a physical Ruuvi Gateway or ruuvi-go-gateway. For a "drop in replacement on a raspberry pi" kind of setup the bridge can be configured into using the http listener and the gateway then using http post, this way no MQTT is required in between. Overall the memory requirements of this "2nd generation" setup is lower despite it running in two processes.

However not all of the RuuviCollector advanced features are available though, so if someone wants to add InfluxDB2 support to the original RuuviCollector by submitting a PR, I'd be happy to review and merge it. The IndluxDB data format is the same as well as the "extra values calculation" though, so data-wise there should be no extra migration needs.

@vallittu
Copy link
Author

vallittu commented Feb 3, 2022

That RuuviBridge looks cool, need to take a closer look at that. I toyed around with the RuuviCollector and Influxdb2 client library and token auth until I got it working, tried to keep the changes to minimum, data-wise it should be same. Then I kinda put it one raspberry pi and forgot it there, I can dig it up and make PR of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants