diff --git a/nut-influxdbv2-exporter.py b/nut-influxdbv2-exporter.py index b76f0cd..d7400d6 100644 --- a/nut-influxdbv2-exporter.py +++ b/nut-influxdbv2-exporter.py @@ -102,7 +102,10 @@ def construct_object(data, remove_keys, host): tags["hardware"]=':'.join(v[i:i+2] for i in range(0,12,2)) elif k == "device.model": w = v.split("FW:", 2) - tags["model"]=w[0].strip() + if v == "InternalBattery-0": + tags["model"]="InternalBattery" + else + tags["model"]=w[0].strip() else: if k in remove_keys: continue