diff options
author | nicolargo <nicolashennion@gmail.com> | 2024-06-29 16:03:27 +0200 |
---|---|---|
committer | nicolargo <nicolashennion@gmail.com> | 2024-06-29 16:03:27 +0200 |
commit | 452fd6497e7386ecccc37de3cc05c28e4fa0796f (patch) | |
tree | 55a1632dc15cd18d37232f4ec646dccf8809d8a9 | |
parent | ccfd8f0aa95238d86f1418fd8ffff32c7014462b (diff) |
Sensors data is not exported using InfluxDB2 exporter #2856
-rw-r--r-- | glances/exports/glances_influxdb/__init__.py | 3 | ||||
-rw-r--r-- | glances/exports/glances_influxdb2/__init__.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/glances/exports/glances_influxdb/__init__.py b/glances/exports/glances_influxdb/__init__.py index e2e5c6ca..b0ae1ee8 100644 --- a/glances/exports/glances_influxdb/__init__.py +++ b/glances/exports/glances_influxdb/__init__.py @@ -139,8 +139,7 @@ class Export(GlancesExport): if k in fields: tags[k] = str(fields[k]) # Remove it from the field list (can not be a field and a tag) - if k in fields: - fields.pop(fields[k]) + fields.pop(k) # Add the measurement to the list ret.append({'measurement': name, 'tags': tags, 'fields': fields}) return ret diff --git a/glances/exports/glances_influxdb2/__init__.py b/glances/exports/glances_influxdb2/__init__.py index 625b9987..75e7698c 100644 --- a/glances/exports/glances_influxdb2/__init__.py +++ b/glances/exports/glances_influxdb2/__init__.py @@ -147,8 +147,7 @@ class Export(GlancesExport): if k in fields: tags[k] = str(fields[k]) # Remove it from the field list (can not be a field and a tag) - if k in fields: - fields.pop(fields[k]) + fields.pop(k) # Add the measurement to the list ret.append({'measurement': name, 'tags': tags, 'fields': fields}) return ret |