Skip to content

Commit

Permalink
added serial > hardware and model > model tags
Browse files Browse the repository at this point in the history
  • Loading branch information
dbsqp authored Apr 12, 2021
1 parent f7215b0 commit c85d53b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nut-influxdbv2-exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c85d53b

Please sign in to comment.