Closed mwaldmueller closed 3 years ago
The line protocol (i.e. the body of the HTTP request you send to InfluxDB) seems to be the same as in v1.x, so this is mostly about authorization and other metadata sent with the request.
So we need the following changes:
username
+password
or basic_auth
(#8314)). Use this do determine whether to use protocol version 1 or 2?database
option optional as this is no longer supported in v2. Could also be used to determine which protocol version is used.In summary, if I haven't missed anything, this should be pretty straight-forward.
Unrelated (to API v2) note: I'm wondering why we use second precision even though both Icinga and InfluxDB support sub-second precision. We could change this to nanoseconds if we're touching the code anyways.
InfluxdbWriter should fully support the changes of InfluxDB OSS 2.0 (see: https://docs.influxdata.com/influxdb/v2.0/write-data/)
In the meantime the compatibility API could help, untested from my side. (see: https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/)