Module: check_mk
Branch: master
Commit: 2f855a9606a788402e39002c570bbd4b1b641d7b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2f855a9606a788…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 4 16:22:00 2014 +0100
#1635 FIX multipath: fix parsing output of multipath on RedHat6 with space in alias
---
.werks/1635 | 9 +++++++++
ChangeLog | 1 +
checks/multipath | 16 ++++++++++++++--
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/.werks/1635 b/.werks/1635
new file mode 100644
index 0000000..b0188eb
--- /dev/null
+++ b/.werks/1635
@@ -0,0 +1,9 @@
+Title: multipath: fix parsing output of multipath on RedHat6 with space in alias
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417706487
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 20dd62c..a2b3f32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -101,6 +101,7 @@
* 1647 FIX: agent_ipmi: Check_MK service gets critical now when ipmi-sensors command
fails
* 1453 FIX: drbd.stats: tried to send non-numeric write order parameter to rrd...
* 1598 FIX: bluecat_dhcp: Check is not longer found in inventory if dhcp service is
not activated
+ * 1635 FIX: multipath: fix parsing output of multipath on RedHat6 with space in
alias
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/checks/multipath b/checks/multipath
index 667042a..7aab5f9 100644
--- a/checks/multipath
+++ b/checks/multipath
@@ -130,6 +130,18 @@ inventory_multipath_rules = []
# \_ round-robin 0 [prio=-1][enabled]
# \_ 4:0:0:11 sdt 65:48 [active][undef]
+# This one here is from RedHat 6. Very creative...
+# 1IET 00010001 dm-4 IET,VIRTUAL-DISK
+# size=200G features='0' hwhandler='0' wp=rw
+# |-+- policy='round-robin 0' prio=0 status=active
+# | `- 23:0:0:1 sdk 8:160 active undef running
+# |-+- policy='round-robin 0' prio=0 status=enabled
+# | `- 21:0:0:1 sdj 8:144 active undef running
+# |-+- policy='round-robin 0' prio=0 status=enabled
+# | `- 22:0:0:1 sdg 8:96 active undef running
+# `-+- policy='round-robin 0' prio=0 status=enabled
+# `- 20:0:0:1 sdi 8:128 active undef running
+
# And a completely new situation:
# <<<multipath>>>
# Nov 05 17:17:03 | DM multipath kernel driver not loaded
@@ -148,11 +160,11 @@ def parse_multipath(info):
# 2: matched regex-group id of alias (optional)
reg_headers = [
(get_regex(r"^[0-9a-z]{33}$"), 0, None), # 1.
(should be included in 3.)
- (get_regex(r"^([^\s]+)\s\(([0-9A-Za-z_-]+)\)"), 2, 1), # 2.
+ (get_regex(r"^([^\s]+)\s\(([0-9A-Za-z_-]+)\)"), 2, 1), # 2.
(get_regex(r"^[a-zA-Z0-9_]+$"), 0, None), # 3.
(get_regex(r"^([0-9a-z]{33}|[0-9a-z]{49})\s?dm.+$"), 1, None), # 4.
(get_regex(r"^[a-zA-Z0-9_]+dm-.+$"), 0, None), # 5.
Remove this line in 1.2.0
- (get_regex(r"^([a-zA-Z0-9_-]+)\s?dm-.+$"), 1, None), # 6. and
7.
+ (get_regex(r"^([-a-zA-Z0-9_ ]+)\s?dm-[0-9]+.*$"), 1, None), # 6. and
7.
]
reg_prio = get_regex("[[ ]prio=")