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: support for influxdb2 #33

Open
nadrog opened this issue Jan 1, 2024 · 8 comments
Open

Feature request: support for influxdb2 #33

nadrog opened this issue Jan 1, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@nadrog
Copy link

nadrog commented Jan 1, 2024

Would it be possible to get support for influxdb2?

@mman
Copy link
Collaborator

mman commented Jan 9, 2024

Support for InfluxDB 2 and upcoming InfluxDB 3 is definitely in the pipeline, but has so far been put on hold given that InfluxDB 1 is the last version working on armv7 required to support some Raspberry Pi models.

More over getting InfluxDB 2 up and running is more complex (setting up bucket + auth tokens) than InfluxDB 1 (where auth can be specified via environment variables).

Could you please elaborate more about what exactly you are looking for at running against InfluxDB 2.x?

@mman
Copy link
Collaborator

mman commented Jan 9, 2024

Dropping here a link for myself about the automated InfluxDB 2 upgrade/deployment procedure that may be useful.

https://docs.influxdata.com/influxdb/v2/install/upgrade/v1-to-v2/docker/

Using several environment variables we may be able to deploy InfluxDB 2 without user intervention, and automatically create a bucket. InfluxQL queries used to populate Grafana panels should work against InfluxDB 2 without problem in compatibility mode, but additional steps are required to map InfluxDB 2 bucket name to InfluxDB 1 database name.

https://docs.influxdata.com/influxdb/v2/query-data/influxql/

The missing piece will be either upgrading InfluxDB client library to add proper support for InfluxDB 2, or continue storing data using InfluxQL compatibility mode, which however does not support CREATE DATABASE venus command that we use to make sure DB is in place. So that will need to be addressed as well.

@nadrog
Copy link
Author

nadrog commented Jan 9, 2024

Sure, in my setup, I plan to use Zima board instead of an RPi and I already have a setup on this server that is based on InfluxDB2. It includes SignalK that uses signalk-to-influxdb2 to save to the DB.
If I could save some data from CerboGX, it would be great.

@mman
Copy link
Collaborator

mman commented Jan 9, 2024

The code needs to be adapted to use https://www.npmjs.com/package/@influxdata/influxdb-client in order to support Influx 1.8 and Influx 2 at the same time. I can't promise when this will happen but this is one of the minimal steps that will allow us to talk to existing InfluxDB 1 and InfluxDB 2 installations.

@Mib83
Copy link

Mib83 commented Mar 7, 2024

Hello Can you tell me when you can use Influx 2 or 3?

@mman
Copy link
Collaborator

mman commented Mar 8, 2024

@Mib83 it's on the agenda, but with no clear date set, so can't promise anything at the moment...

@nadrog
Copy link
Author

nadrog commented Dec 15, 2024

Is this a good project for Christmas and New Year holidays? ;)

@mman
Copy link
Collaborator

mman commented Jan 13, 2025

The following list outlines the necessary changes with explanations:

  • UI: Add Tab/Popup selector allowing the user to choose what version of Influx to connect to v1.8+ or v2.0+.
  • UI: When v1.8+ is selected we need to enter Username, Password, and Database.
  • UI: When v2.0+ is selected we need to enter Org, Token, and Bucket.

These are required to correctly support proper nomenclature used by each InfluxDB version.

  • Loader: Add dependency on @influxdata/influxdb-client, @influxdata/influxdb-client-apis.
  • Loader: Store in configuration proper values for token and bucket, when entering details for v1.8+ use the compatibility format specified in https://github.com/influxdata/influxdb-client-js/blob/master/examples/influxdb-1.8.ts.
  • Loader: Modify code to fetch list of buckets and create new venus bucket if necessary.
  • Loader: Modify code to adjust retention policy of venus bucket.
  • Loader: Modify code to write point to InfluxDB
  • Loader: Handle disconnect/reconnect from the InfluxDB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants