@cryptotaxi247 / netdata-1 / commits / b2b0f3b8b

hddtemp: update regex

lgz committed Jun 18, 2018 at 21:20 UTC b2b0f3b8b6be728ad7c7bf50c5a61ff0110c9929
1 file changed +2 -2
python.d/hddtemp.chart.py
+2 -2
@@ -21,12 +21,12 @@ CHARTS = {
21 # lines are created dynamically in `check()` method
22 ]}}
23
24 -RE = re.compile(r'\/([a-zA-Z_0-9-]+)\|([a-zA-Z0-9- ]+)\|([0-9]+|SLP|UNK)\|')
24 +RE = re.compile(r'\/dev\/([^|]+)\|([^|]+)\|([0-9]+|SLP|UNK)\|')
25
26
27 class Disk:
28 def __init__(self, id_, name, temp):
29 - self.id = id_.replace(' ', '_')
29 + self.id = id_.split('/')[-1]
30 self.name = name.replace(' ', '_')
31 self.temp = temp if temp.isdigit() else 0
32