From 2c389b5a2cec90d18b318d80ac3c748205b72bb6 Mon Sep 17 00:00:00 2001 From: slavox Date: Mon, 11 Jan 2021 16:18:07 +0000 Subject: Change HDDtemp to report None instead of 0 (#10429) Currently the HDD temp plugin reports 0 c when a drive fails to report temp correctly. changing this to reporting None type resolves this issue and the failures simply leave gaps in the chart. If the original behavior is preferred for some reason I'd be curious as to why or if there is a better way that doesn't add erroneous data to the chart? --- collectors/python.d.plugin/hddtemp/hddtemp.chart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'collectors') diff --git a/collectors/python.d.plugin/hddtemp/hddtemp.chart.py b/collectors/python.d.plugin/hddtemp/hddtemp.chart.py index d89ae2cb7b..6427aa1804 100644 --- a/collectors/python.d.plugin/hddtemp/hddtemp.chart.py +++ b/collectors/python.d.plugin/hddtemp/hddtemp.chart.py @@ -28,7 +28,7 @@ class Disk: def __init__(self, id_, name, temp): self.id = id_.split('/')[-1] self.name = name.replace(' ', '_') - self.temp = temp if temp.isdigit() else 0 + self.temp = temp if temp.isdigit() else None def __repr__(self): return self.id -- cgit v1.2.3