This changed in stretch, and broke check_md_raid. Adding rstrip()
makes things happier.
+nagios-plugins-local (0.15~test.0) UNRELEASED; urgency=medium
+
+ * check_md_raid:
+ - strip trailing spaces from mdadm state
+
+ -- Michael Howe <michael.howe@it.ox.ac.uk> Wed, 06 Sep 2017 19:00:00 +0100
+
nagios-plugins-local (0.14) unstable; urgency=low
* nagios-plugins-local-server:
state = "unknown"
for line in detailed_output:
if "State :" in line:
- state = line.split(":")[-1][1:-1]
+ state = line.split(":")[-1][1:-1].rstrip()
re_clean = re.compile('^clean(, no-errors)?$')
if not re_clean.match(state) and state != "active":
arrays_not_ok += 1