From 712766728e80903a6e69b4a23343bf5b6c364de1 Mon Sep 17 00:00:00 2001 From: dbsqp <5895806+dbsqp@users.noreply.github.com> Date: Sun, 18 Apr 2021 21:02:38 +0200 Subject: [PATCH] update InternalBattery-0 > InternalBattery --- nut-influxdbv2-exporter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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