From c85d53bc7f650591439cf45463e058262e4b7f65 Mon Sep 17 00:00:00 2001 From: dbsqp Date: Mon, 12 Apr 2021 19:37:09 +0200 Subject: [PATCH] added serial > hardware and model > model tags --- nut-influxdbv2-exporter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nut-influxdbv2-exporter.py b/nut-influxdbv2-exporter.py index 3c4e45d..6f6a259 100644 --- a/nut-influxdbv2-exporter.py +++ b/nut-influxdbv2-exporter.py @@ -92,8 +92,10 @@ def construct_object(data, remove_keys, host): tags['host']=host for k, v in data.items(): - if k == "device.model": + if k == "ups.serial": tags["hardware"]=v + elif k == "device.model": + tags["model"]=v else: if k in remove_keys: continue