Module: check_mk
Branch: master
Commit: fd15d2ad668f82ff5f018b8a35d25d4505d60e59
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fd15d2ad668f82…
Author: Óscar Nájera <on(a)mathias-kettner.de>
Date: Fri Jan 11 12:55:55 2019 +0100
6656 FIX Bug predictive levels Diskstat, read-write wait
Predictive levels on diskstat check could not reach the read-wait, nor write-wait perf
data.
Change-Id: I4f65a020b5bebed814e9484f725d2814df210ac4
---
.werks/6656 | 12 ++++++++++++
checks/diskstat.include | 8 ++++++--
tests/unit/checks/test_diskstat.py | 16 ++++++++--------
3 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/.werks/6656 b/.werks/6656
new file mode 100644
index 0000000..b8e8f65
--- /dev/null
+++ b/.werks/6656
@@ -0,0 +1,12 @@
+Title: Bug predictive levels Diskstat, read-write wait
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1547207314
+
+Predictive levels on diskstat check could not reach the read-wait, nor write-wait perf
data.
+
diff --git a/checks/diskstat.include b/checks/diskstat.include
index bfcd82d..8abb2de 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -457,7 +457,7 @@ def check_diskstat_dict(item, params, disks):
wait = disk.pop("average_" + what)
yield check_levels(
wait,
- what,
+ "disk_average_" + what,
params.get(what),
unit="ms",
scale=0.001,
@@ -485,7 +485,11 @@ def check_diskstat_dict(item, params, disks):
if what in disk:
ql = disk.pop(what)
yield check_levels(
- ql, what, params.get(what), statemarkers=False, infoname="Average
%s" % plugin_text)
+ ql,
+ "disk_" + what,
+ params.get(what),
+ statemarkers=False,
+ infoname="Average %s" % plugin_text)
# I/O operations
for what in "read", "write":
diff --git a/tests/unit/checks/test_diskstat.py b/tests/unit/checks/test_diskstat.py
index 299263d..ea798af 100644
--- a/tests/unit/checks/test_diskstat.py
+++ b/tests/unit/checks/test_diskstat.py
@@ -35,11 +35,11 @@ pytestmark = pytest.mark.checks
}, [(0, 'Utilization: 0.00%', [('disk_utilization', 0.0)]),
(0, 'Read: 0.00 B/s', [('disk_read_throughput', 0.0)]),
(0, 'Write: 0.00 B/s', [('disk_write_throughput', 0.0)]),
- (0, 'Average Wait: 0.00 ms', [('wait', 0.0)]),
- (0, 'Average Read Wait: 0.00 ms', [('read_wait', 0.0)]),
- (0, 'Average Write Wait: 0.00 ms', [('write_wait', 0.0)]),
+ (0, 'Average Wait: 0.00 ms', [('disk_average_wait', 0.0)]),
+ (0, 'Average Read Wait: 0.00 ms', [('disk_average_read_wait',
0.0)]),
+ (0, 'Average Write Wait: 0.00 ms', [('disk_average_write_wait',
0.0)]),
(0, 'Latency: 0.00 ms', [('disk_latency', 0.0)]),
- (0, 'Average Queue Length: 0.00', [('queue_length', 0.0)]),
+ (0, 'Average Queue Length: 0.00', [('disk_queue_length', 0.0)]),
(1, 'Read operations: 201.00 1/s (warn/crit at 200.00 1/s/300.00 1/s)',
[('disk_read_ios', 201.0, 200.0, 300.0)]),
(1, 'Write operations: 401.00 1/s (warn/crit at 400.00 1/s/500.00 1/s)',
@@ -75,11 +75,11 @@ pytestmark = pytest.mark.checks
}, [(0, 'Utilization: 0.00%', [('disk_utilization', 0.0)]),
(0, 'Read: 0.00 B/s', [('disk_read_throughput', 0.0)]),
(0, 'Write: 0.00 B/s', [('disk_write_throughput', 0.0)]),
- (0, 'Average Wait: 0.00 ms', [('wait', 0.0)]),
- (0, 'Average Read Wait: 0.00 ms', [('read_wait', 0.0)]),
- (0, 'Average Write Wait: 0.00 ms', [('write_wait', 0.0)]),
+ (0, 'Average Wait: 0.00 ms', [('disk_average_wait', 0.0)]),
+ (0, 'Average Read Wait: 0.00 ms', [('disk_average_read_wait',
0.0)]),
+ (0, 'Average Write Wait: 0.00 ms', [('disk_average_write_wait',
0.0)]),
(0, 'Latency: 0.00 ms', [('disk_latency', 0.0)]),
- (0, 'Average Queue Length: 0.00', [('queue_length', 0.0)]),
+ (0, 'Average Queue Length: 0.00', [('disk_queue_length', 0.0)]),
(2, 'Read operations: 301.00 1/s (warn/crit at 200.00 1/s/300.00 1/s)',
[('disk_read_ios', 301.0, 200.0, 300.0)]),
(2, 'Write operations: 501.00 1/s (warn/crit at 400.00 1/s/500.00 1/s)',