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

upgrade influx to v2 #8

Open
leeprevost opened this issue Aug 21, 2022 · 5 comments
Open

upgrade influx to v2 #8

leeprevost opened this issue Aug 21, 2022 · 5 comments

Comments

@leeprevost
Copy link

I and other users have successfully gotten the influxdb plugin to support the new v2 influx db.

tkurki/signalk-to-influxdb#63

Also, there is work underway to upgrade the plug in to support the v2 client.

What would need to happen to move to influxdb oss version 2?

@KEGustafsson
Copy link
Owner

KEGustafsson commented Aug 21, 2022

@leeprevost, I have had test docker-compose for Influxdb v2 for quite sometime already (dated late 2020).
https://github.com/KEGustafsson/influxdbv2-test-docker

Would you like to test if this one would be working solution?
I updated it to pointing latest Influxdb image, influxdb:latest.

There is also Telegraf instance reading SK vessel self http json and putting that data to Influxdb.
If this is a working solution then I could merge changes here too.

To migrate data from v1.x to v2.3, check guide from here
https://docs.influxdata.com/influxdb/v2.3/upgrade/v1-to-v2/

@leeprevost
Copy link
Author

That sounds pretty cool.

On the Telegraf question, I've been using the signalk-to-influxdb plug in pulling in self data at 200ms intervals. My requirement is to do some light math on the high freq data (show things like temp change per meter traveled via derivative (waterTemp)/speedThroughWater to show tempChgPerMeter. I can then capture anomalies only, save to another bucket and then downsample the data to something like 1sec or even less.

I see you are using 60sec. Is that becaause Telegraf has to poll slowly? can it poll faster? Also., how does Telegraf put the data into the db? Is it all values into one record or breaks each key on self into separate measureements? If the latter, this is similar to how the plug-in works. I'm struggling to normalize them, join them, and then do the math like the above when measurements don't come in on same timestamps. I assume that is because of the N2k bus.

So, I've migrated and am now using influxdb2 but am still on the older plug-in.

If I follow you right, Telegraf allows you to avoid using a plug in at all? Or be independent of javascript an client versions?

@KEGustafsson
Copy link
Owner

KEGustafsson commented Aug 22, 2022

It seams that old run_me script is not working, so Influxdb_v2 account need to be done via cli/web at the moment.
I'll fix this later.

Anyway, I can see data coming in via Telegraf to bucket. My Flux language knowledge is so poor that I cannot do detailed queries at the moment with Grafana, but with Influxdb GUI I can see all http JSON data

@KEGustafsson
Copy link
Owner

KEGustafsson commented Aug 23, 2022

Now script and docker-compose are fixed.
https://github.com/KEGustafsson/influxdbv2-test-docker

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

No branches or pull requests

2 participants