The connection test for InfluxDB over HTTP(S) queries the '/health'
endpoint. The InfluxDB v2 listener of Telegraf only has it since
version 1.36, older versions only provide '/api/v2/ready'. So adding
such a listener as metric server fails with '404 Not Found', although
writing metrics to it would work.
If '/health' is not found, query '/api/v2/ready' instead. Other errors,
like an invalid token, are still reported right away.
Signed-off-by: Michal Fox <me@dualfroz.com>
The type of a storage is sent as a tag, but it is also part of the
storage status data and so sent as a field with the same name.
InfluxDB 3 does not allow this and rejects the whole write with:
'type' is used as both a tag and a field
so no storage metrics end up in the database.
Exclude the type from the fields, like it is already done for the
VMID of guests since commit 456be471 ("fix #3440: influxdb: remove
duplicate vmid tag").
Signed-off-by: Michal Fox <me@dualfroz.com>