@cryptotaxi247 / netdata-1 / commits / 2c389b5a2

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?

slavox committed Jan 11, 2021 at 16:18 UTC 2c389b5a2cec90d18b318d80ac3c748205b72bb6
1 file changed +1 -1
collectors/python.d.plugin/hddtemp/hddtemp.chart.py
+1 -1
@@ -28,7 +28,7 @@ class Disk:
28 def __init__(self, id_, name, temp):
29 self.id = id_.split('/')[-1]
30 self.name = name.replace(' ', '_')
31 - self.temp = temp if temp.isdigit() else 0
31 + self.temp = temp if temp.isdigit() else None
32
33 def __repr__(self):
34 return self.id