Sensors data is not exported using InfluxDB2 exporter #2856

This commit is contained in:
nicolargo 2024-06-29 16:03:27 +02:00
parent ccfd8f0aa9
commit 452fd6497e
2 changed files with 2 additions and 4 deletions

View File

@ -139,8 +139,7 @@ class Export(GlancesExport):
if k in fields: if k in fields:
tags[k] = str(fields[k]) tags[k] = str(fields[k])
# Remove it from the field list (can not be a field and a tag) # Remove it from the field list (can not be a field and a tag)
if k in fields: fields.pop(k)
fields.pop(fields[k])
# Add the measurement to the list # Add the measurement to the list
ret.append({'measurement': name, 'tags': tags, 'fields': fields}) ret.append({'measurement': name, 'tags': tags, 'fields': fields})
return ret return ret

View File

@ -147,8 +147,7 @@ class Export(GlancesExport):
if k in fields: if k in fields:
tags[k] = str(fields[k]) tags[k] = str(fields[k])
# Remove it from the field list (can not be a field and a tag) # Remove it from the field list (can not be a field and a tag)
if k in fields: fields.pop(k)
fields.pop(fields[k])
# Add the measurement to the list # Add the measurement to the list
ret.append({'measurement': name, 'tags': tags, 'fields': fields}) ret.append({'measurement': name, 'tags': tags, 'fields': fields})
return ret return ret