fix #6560: metrics: influxdb: do not send storage type as field too
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>
This commit is contained in:
1 parent
c739e509f9
commit
5537758fe8
1 file changed
+2
-1
@@ -150,7 +150,8 @@ sub update_storage_status {
|
|||||||
}
|
}
|
||||||
$object =~ s/\s/\\ /g;
|
$object =~ s/\s/\\ /g;
|
||||||
|
|
||||||
build_influxdb_payload($class, $txn, $data, $ctime, $object);
|
# type is already added in base $object above, so exclude it from being re-added
|
||||||
|
build_influxdb_payload($class, $txn, $data, $ctime, $object, { 'type' => 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _send_batch_size {
|
sub _send_batch_size {
|
||||||
|
|||||||
Reference in new issue
Block a user