[checkmk-commits] Check_MK Git: check_mk: FIX: multipath check now handles dashes in " user friendly names"

git version control git at mathias-kettner.de
Thu Oct 11 16:58:03 CEST 2012


Module: check_mk
Branch: master
Commit: 341226bd5eb3956f5e8b48865aabc84392eb6748
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=341226bd5eb3956f5e8b48865aabc84392eb6748

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Thu Oct 11 16:55:20 2012 +0200

FIX: multipath check now handles dashes in "user friendly names"

---

 ChangeLog        |    1 +
 checks/multipath |   11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 58fb475..a035b55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -85,6 +85,7 @@
     Checks & Agents:
     * FIX: Linux mk_logwatch: iregex Parameter was never used
     * FIX: Windows agent: quote '%' in plugin output correctly
+    * FIX: multipath check now handles '-' in "user friendly names"
 
 1.2.1i1:
     Core:
diff --git a/checks/multipath b/checks/multipath
index 2eb1a40..0d9ccbc 100644
--- a/checks/multipath
+++ b/checks/multipath
@@ -120,6 +120,15 @@
 #  \_ 4:0:1:11 sdcf 69:48   [active][undef]
 #  \_ 3:0:0:11 sdl  8:176   [active][undef]
 
+# Just an underscore and a dash in the LUN name
+# SDataCoreSANsymphony_DAT05-fscl dm-6 DataCore,SANsymphony
+# [size=600G][features=0][hwhandler=0]
+# \_ round-robin 0 [prio=-1][enabled]
+#  \_ 3:0:0:11 sdae 65:224 [active][undef]
+# \_ round-robin 0 [prio=-1][enabled]
+#  \_ 4:0:0:11 sdt  65:48  [active][undef]
+
+
 
 def parse_multipath_output(info, only_uuid = None):
     # only_uuid --> look only for data of this uuid or alias
@@ -136,7 +145,7 @@ def parse_multipath_output(info, only_uuid = None):
         (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.
+        (get_regex(r"^([a-zA-Z0-9_-]+)\s?dm-.+$"),           1, None), # 6. and 7.
     ]
 
     reg_prio = get_regex("[[ ]prio=")



More information about the checkmk-commits mailing list