Module: check_mk
Branch: master
Commit: 4ec762e5e012a8915a9fbd6f7b0c6075d40715d6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ec762e5e012a8…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Feb 12 16:55:12 2019 +0100
7097 diskstat.include: Read/write latency are configurable now
Change-Id: I4306534b98569aec26ef21b25727a003341bb2b3
---
.werks/7097 | 12 ++++++++++++
checks/diskstat.include | 16 ++++++++++++++++
cmk/gui/plugins/wato/check_parameters/diskstat.py | 12 ++++++++++++
3 files changed, 40 insertions(+)
diff --git a/.werks/7097 b/.werks/7097
new file mode 100644
index 0000000..d65d173
--- /dev/null
+++ b/.werks/7097
@@ -0,0 +1,12 @@
+Title: diskstat.include: Read/write latency are configurable now
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1549986859
+Class: feature
+
+Nearly all check plugins which use the diskstat.include in order to check
+disk IO provide an average value for the disk latency. Newer checks may
+provide values for disk read and write latency.
diff --git a/checks/diskstat.include b/checks/diskstat.include
index 8abb2de..7a413d3 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -476,6 +476,22 @@ def check_diskstat_dict(item, params, disks):
statemarkers=False,
infoname='Latency')
+ # Read/write disk latency
+ for what in ["read", "write"]:
+ latency_key = "%s_latency"
+ if latency_key not in disk:
+ continue
+ latency = disk.pop(latency_key)
+ if latency is not None:
+ yield check_levels(
+ latency,
+ "disk_%s" % latency_key,
+ params.get(latency_key),
+ unit="ms",
+ scale=0.001,
+ statemarkers=False,
+ infoname='%s latency' % what.title())
+
# Queue lengths
for what, plugin_text in [
("queue_length", "Queue Length"),
diff --git a/cmk/gui/plugins/wato/check_parameters/diskstat.py
b/cmk/gui/plugins/wato/check_parameters/diskstat.py
index a584a73..11d64f3 100644
--- a/cmk/gui/plugins/wato/check_parameters/diskstat.py
+++ b/cmk/gui/plugins/wato/check_parameters/diskstat.py
@@ -126,6 +126,18 @@ class
RulespecCheckgroupParametersDiskstat(CheckParameterRulespecWithItem):
unit=_("ms"),
default_levels=(80.0, 160.0),
)),
+ ("read_latency",
+ Levels(
+ title=_("Disk Read Latency"),
+ unit=_("ms"),
+ default_levels=(80.0, 160.0),
+ )),
+ ("write_latency",
+ Levels(
+ title=_("Disk Write Latency"),
+ unit=_("ms"),
+ default_levels=(80.0, 160.0),
+ )),
("read_wait", Levels(
title=_("Read wait"), unit=_("ms"),
default_levels=(30.0, 50.0))),
("write_wait",