Module: check_mk
Branch: master
Commit: 2deaea52d637582a4e581bddda2f783773e3ed9a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2deaea52d63758…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 15:45:29 2013 +0100
FIX multipath: Inventory handles non loaded kernel module now
The handling for not loaded multipath kernel module and not existing
multipath.conf was not working in all cases. This has been improved now.
---
.werks/360 | 11 +++++++++++
ChangeLog | 1 +
checks/multipath | 14 ++++++++++++--
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/.werks/360 b/.werks/360
new file mode 100644
index 0000000..0226ffe
--- /dev/null
+++ b/.werks/360
@@ -0,0 +1,11 @@
+Title: multipath: Inventory handles non loaded kernel module now
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387205073
+Targetversion: future
+
+The handling for not loaded multipath kernel module and not existing
+multipath.conf was not working in all cases. This has been improved now.
diff --git a/ChangeLog b/ChangeLog
index 4606796..ade0b7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,7 @@
* 0355 FIX: heartbeat_crm: Now handling "Failed actions:" output in
agent...
* 0357 FIX: megaraid_bbu: Fixed expected state checking...
* 0358 FIX: df: now ignores filesystems with a reported size of '-'...
+ * 0360 FIX: multipath: Inventory handles non loaded kernel module now...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in
Chrome/IE
diff --git a/checks/multipath b/checks/multipath
index d3e73f4..6457f69 100644
--- a/checks/multipath
+++ b/checks/multipath
@@ -128,7 +128,14 @@
# \_ round-robin 0 [prio=-1][enabled]
# \_ 4:0:0:11 sdt 65:48 [active][undef]
-
+# And a completely new situation:
+# <<<multipath>>>
+# Nov 05 17:17:03 | DM multipath kernel driver not loaded
+# Nov 05 17:17:03 | /etc/multipath.conf does not exist, blacklisting all devices.
+# Nov 05 17:17:03 | A sample multipath.conf file is located at
+# Nov 05 17:17:03 | /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf
+# Nov 05 17:17:03 | You can run /sbin/mpathconf to create or modify /etc/multipath.conf
+# Nov 05 17:17:03 | DM multipath kernel driver not loaded
def parse_multipath_output(info, only_uuid = None):
# only_uuid --> look only for data of this uuid or alias
@@ -171,7 +178,10 @@ def parse_multipath_output(info, only_uuid = None):
l = " ".join(line)
# Skip output when multipath is not present
- if l.endswith('DM multipath kernel driver not loaded'):
+ if l.endswith('DM multipath kernel driver not loaded') \
+ or l.endswith('does not exist, blacklisting all devices.') \
+ or l.endswith('A sample multipath.conf file is located at') \
+ or l.endswith('multipath.conf'):
uuid = None
continue