Fix `hpssa` parse error (#12206)
Woo committed
Feb 22, 2022 at 08:06 UTC
20dfab81927abb4f99c99416e9a2c551d650f1b9
1 file changed
+2
-1
collectors/python.d.plugin/hpssa/hpssa.chart.py
+2
-1
@@ -93,6 +93,7 @@ ignored_sections_regex = re.compile(
93
re.X
94
)
95
mirror_group_regex = re.compile(r'^Mirror Group \d+:$')
96
+disk_partition_regex = re.compile(r'^Disk Partition Information$')
97
array_regex = re.compile(r'^Array: (?P<id>[A-Z]+)$')
98
drive_regex = re.compile(
99
r'''
@@ -242,7 +243,7 @@ class HPSSA(object):
243
}
244
245
for line in self:
245
- if mirror_group_regex.match(line):
246
+ if HPSSA.match_any(line, mirror_group_regex, disk_partition_regex):
247
self.parse_ignored_section()
248
continue
249