Module: check_mk
Branch: master
Commit: 8d93ba60c512e8ce293661b370ffbfde35d9ea9c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d93ba60c512e8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 10 13:17:16 2015 +0200
#2506 FIX Diskstat summary: Ignoring stats from LVM devices
---
.werks/2506 | 9 +++++++++
ChangeLog | 1 +
checks/diskstat.include | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/.werks/2506 b/.werks/2506
new file mode 100644
index 0000000..062482d
--- /dev/null
+++ b/.werks/2506
@@ -0,0 +1,9 @@
+Title: Diskstat summary: Ignoring stats from LVM devices
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1439205423
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 5d8811f..3d650d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -106,6 +106,7 @@
* 2418 FIX: agent_vsphere.pysphere: legacy agent no longer aborts when evaluating
unknown ssl option...
* 2503 FIX: diskstat: Only excluding multipath members when infos for multipath
devices are available...
* 2504 FIX: cups_queues: Fixed wrong queue discovery on hosts running apcupsd
+ * 2506 FIX: Diskstat summary: Ignoring stats from LVM devices
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/diskstat.include b/checks/diskstat.include
index 599a640..4837d6c 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -315,6 +315,10 @@ def diskstat_select_disk(disks, item):
for key in disk.keys():
if key != "node":
summarized.setdefault(key, 0.0)
+
+ if device.startswith("LVM "):
+ continue # skip LVM devices for summary
+
if True or disk["read_throughput"] +
disk["write_throughput"] > 0: # skip idle disks
num_averaged += 1
for key, value in disk.items():