FreifunkBremen / yanic

Yet another node info collector - for respondd to be used with meshviewer to Grafana (with influxdb or graphite)
https://freifunkbremen.github.io/yanic/
GNU Affero General Public License v3.0
20 stars 41 forks source link

Issues with Influx 2.0 #202

Closed lemoer closed 4 months ago

lemoer commented 3 years ago

Hi there,

we recently updated to InfluxDB 2.0 and now we have problems, that Yanic is not able to write to InfluxDB anymore.

In the yanic logs, I see this:

Mai 19 23:17:36 harvester yanic[12647]: time="2021-05-19T23:17:36.313+02:00" level="info" msg="saving points" data.count=1000 caller="database.go:162 github.com/FreifunkBremen/yanic/database/influxdb.(*Connection).addWorker"
Mai 19 23:17:46 harvester yanic[12647]: time="2021-05-19T23:17:46.342+02:00" level="error" msg="{\"code\":\"internal error\",\"message\":\"unexpected error writing points to database: timeout\"}" caller="database.go:165 github.com/FreifunkBremen/yanic/database/influxdb.(*Connection).addWorker"

I have inspected the HTTP traffic between Yanic and InfluxDB and it seems that InfluxDB returns an 500 Internal Server Error with

{\"code\":\"internal error\",\"message\":\"unexpected error writing points to database: timeout\"}

in the HTTP body.

So far I was not able to figure out, what that means. Does anybody have an idea here?

1977er commented 3 years ago

Probably b/c it uses https://github.com/influxdata/influxdb1-client which does not speak to the 2.0 API. Maybe it has to be rewritten with https://github.com/influxdata/influxdb-client-go

lemoer commented 3 years ago

There is compatibility: https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/.

GoliathLabs commented 2 years ago

It would be nice to see this merged. We currently use influxdb 2 and yanic dies when influx is not available

genofire commented 2 years ago

I am with you. Sorry for that delay. I current have no time for speed it, to fix and write tests. I believe it will take minimale two month more.

Maybe somebody else has time.

github-actions[bot] commented 4 months ago

:tada: This issue has been resolved in version 1.6.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: