[pve-devel] [PATCH manager] fix #3440: influxdb: remove duplicate vmid tag

Lorenz Stechauner l.stechauner at proxmox.com
Tue May 25 15:27:17 CEST 2021


remove vmid from data part, it is already contained in object part.

Signed-off-by: Lorenz Stechauner <l.stechauner at proxmox.com>
---
Tested with local udp listener. works as expected.

 PVE/Status/InfluxDB.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/Status/InfluxDB.pm b/PVE/Status/InfluxDB.pm
index 9e4b0d96..c50aa9c8 100644
--- a/PVE/Status/InfluxDB.pm
+++ b/PVE/Status/InfluxDB.pm
@@ -94,6 +94,8 @@ sub update_qemu_status {
     }
     $object =~ s/\s/\\ /g;
 
+    # Duplicate keys may result in unwanted behavior
+    delete $data->{vmid};
     build_influxdb_payload($class, $txn, $data, $ctime, $object);
 }
 
@@ -108,6 +110,8 @@ sub update_lxc_status {
     }
     $object =~ s/\s/\\ /g;
 
+    # Duplicate keys may result in unwanted behavior
+    delete $data->{vmid};
     build_influxdb_payload($class, $txn, $data, $ctime, $object);
 }
 
-- 
2.20.1






More information about the pve-devel mailing list