Module: check_mk
Branch: master
Commit: c82959c6b7f01e1718ce8c8639b21d16c43c29c5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c82959c6b7f01e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 6 10:20:37 2015 +0200
#2503 FIX diskstat: Only excluding multipath members when infos for multipath devices are
available
Werk #1831 made the discovery exclude member disks of multipath devices. Only do this
when
diskstat has information for the multipath devices. Otherwise there will be no Disk IO
information
at all for these devices.
---
.werks/2503 | 11 +++++++++++
ChangeLog | 1 +
checks/diskstat | 15 ++++++++++-----
checks/multipath | 1 +
4 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/.werks/2503 b/.werks/2503
new file mode 100644
index 0000000..7653b89
--- /dev/null
+++ b/.werks/2503
@@ -0,0 +1,11 @@
+Title: diskstat: Only excluding multipath members when infos for multipath devices are
available
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1438848951
+Class: fix
+
+Werk #1831 made the discovery exclude member disks of multipath devices. Only do this
when
+diskstat has information for the multipath devices. Otherwise there will be no Disk IO
information
+at all for these devices.
diff --git a/ChangeLog b/ChangeLog
index 76f5fbb..83261fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -100,6 +100,7 @@
* 2415 FIX: check_mail, check_mail_loop: fixed incorrect POP3 ssl setting (thanks to
Bernhard Schmidt)...
* 2452 FIX: cisco_temperature: Fixed handling of scaling...
* 2416 FIX: agent_netapp: fixed rare problem where environmental sensor info (fan,
psus, temp) were not shown...
+ * 2503 FIX: diskstat: Only excluding multipath members when infos for multipath
devices are available...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/diskstat b/checks/diskstat
index 5fd250f..f6856eb 100644
--- a/checks/diskstat
+++ b/checks/diskstat
@@ -297,13 +297,18 @@ def diskstat_convert_info(info):
converted_disks = dict(disks.items()) # we must not mody info!
# If we have information about multipathing, then remove the
- # physical path devices from the disks array. Also rename the
- # generic names like "dm-8" with multipath names like
"SDataCoreSANsymphony_DAT07-fscl"
+ # physical path devices from the disks array. But only do this,
+ # when there are information for the multipath device available.
+ #
+ # For multipath entries: Rename the generic names like "dm-8"
+ # with multipath names like "SDataCoreSANsymphony_DAT07-fscl"
if multipath_info:
for uuid, multipath in multipath_info.items():
- for path in multipath["paths"]:
- if path in converted_disks:
- del converted_disks[path]
+ if multipath["device"] in converted_disks:
+ for path in multipath["paths"]:
+ if path in converted_disks:
+ del converted_disks[path]
+
if multipath["device"] in converted_disks:
converted_disks[uuid] = converted_disks[multipath["device"]]
del converted_disks[multipath["device"]]
diff --git a/checks/multipath b/checks/multipath
index eabd80f..d39a3d4 100644
--- a/checks/multipath
+++ b/checks/multipath
@@ -161,6 +161,7 @@ def parse_multipath(info):
# 3: matched regex-group id of dm-device (optional)
reg_headers = [
(regex(r"^[0-9a-z]{33}$"), 0, None,
None), # 1. (should be included in 3.)
+ (regex(r"^([^\s]+)\s\(([0-9A-Za-z_-]+)\)\s(dm.[0-9]+)"), 2, 1, 3),
# 2.
(regex(r"^([^\s]+)\s\(([0-9A-Za-z_-]+)\)"), 2, 1,
None), # 2.
(regex(r"^[a-zA-Z0-9_]+$"), 0, None,
None), # 3.
(regex(r"^([0-9a-z]{33}|[0-9a-z]{49})\s?(dm.[0-9]+).*$"), 1, None, 2),
# 4.