From a96680090235dd2bf38fd515c03d3ef6297b4424 Mon Sep 17 00:00:00 2001 From: dbsqp Date: Mon, 12 Apr 2021 19:44:49 +0200 Subject: [PATCH] mac formatted serial for hardware --- nut-influxdbv2-exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nut-influxdbv2-exporter.py b/nut-influxdbv2-exporter.py index 6f6a259..813488f 100644 --- a/nut-influxdbv2-exporter.py +++ b/nut-influxdbv2-exporter.py @@ -93,7 +93,7 @@ def construct_object(data, remove_keys, host): for k, v in data.items(): if k == "ups.serial": - tags["hardware"]=v + tags["hardware"]=':'.join(v[i:i+2] for i in range(0,12,2)) elif k == "device.model": tags["model"]=v else: