-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add InfluxDB V2 support #195
base: master
Are you sure you want to change the base?
Conversation
This contains all the data needed for connecting and writing to an InfluxDB2 server
This stores the data needed for InfluxDB2, and has a single `write_points` function on this that takes an array of points to add to the database
I've pulled this down and it seems to work well! The only issue I've noticed is that the bucket setting in the ini doesn't work - looks like the setter line in iniparser.py is missing. |
@Steve0320 Thanks! Fixed that up so now its using the correct bucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty solid!
I will try to look this evening |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I cant seem to get this working. Did I do it wrong? I'm using: boerderij/varken:develop with InfluxDB 2.1.1 My .ini:
where my username is my organization and pass is the token. I have also tried using the text version of my organization wrapped in double quotes. No matter what I use I just keep getting an unauthorized error in the log.
Using the same organization number and token to add the datasource in the InfluxDB to connect to the varken bucket connects fine. What am I screwing up? |
@gcrevell Can you look at a few things?
|
Hi @gcrevell. Thanks for looking into this - InfluxDBv2 support would be great in Varken! Are you still planning on addressing the items samwiseg0 mentions above? |
I rebased this branch on develop but ran into trouble with the URL validator when I pass my influx URL (https://influx.domain.tld). I bypassed the validation and everything is working for me, but I'm not great with regex so I'm not sure how to fix that check. If there's still interest I can address the other feedback here and open a PR |
Which line? This one?
I'm 10000000% interested in a working influxV2 version! :D |
I believe it should be handled as a domain, but I just bypassed the check to get it running.
I did add some automation and push my working branch to |
What if you remove the |
Note I'm using the Like the following lines:
For some reason using Then in
Hope this helps someone. |
This addresses issue #159, adding support for InfluxDB 2 to Varken.
To use InfluxDB 2, start an instance it. I recommend this docker image. The config is pretty different from version 1, requiring an organization name and token for authentication.
I recommend creating the bucket in the database ahead of time, because then a token can be created that only allows writes to the single bucket. If creating a bucket is needed, varken will need an all-access token, instead of a read-write token.
I've tested this myself and it seems to work pretty well, but let me know if there's any questions or issues!