Module: check_mk
Branch: master
Commit: f76a49f8345fbc8dacc238908923fad27d9ad641
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f76a49f8345fbc…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jun 14 14:30:26 2017 +0200
4829 FIX netapp_api_volumes: fixed missing read/write/latency graphs for the various data
protocols
Change-Id: Ic608c149a09234b36bfeae4b842c7cd8666ae986
---
.werks/4829 | 11 ++++++++++
web/plugins/metrics/check_mk.py | 48 +++++++++++++++++++++++++++++------------
2 files changed, 45 insertions(+), 14 deletions(-)
diff --git a/.werks/4829 b/.werks/4829
new file mode 100644
index 0000000..3ee0a21
--- /dev/null
+++ b/.werks/4829
@@ -0,0 +1,11 @@
+Title: netapp_api_volumes: fixed missing read/write/latency graphs for the various data
protocols
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1497443386
+
+
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 91444f6..af1f2b9 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -3948,18 +3948,9 @@ check_metrics["check-mk-host-tcp"] = {
"time" : { "name": "response_time" }
}
-check_metrics["check_mk-netapp_api_volumes"] = {
- "nfs_read_latency" : { "scale" : m },
- "nfs_write_latency" : { "scale" : m },
- "cifs_read_latency" : { "scale" : m },
- "cifs_write_latency" : { "scale" : m },
- "san_read_latency" : { "scale" : m },
- "san_write_latency" : { "scale" : m },
- "fcp_read_latency" : { "scale" : m },
- "fcp_write_latency" : { "scale" : m },
- "iscsi_read_latency" : { "scale" : m },
- "iscsi_write_latency" : { "scale" : m },
-}
+
+
+
check_metrics["check_mk-citrix_serverload"] = {
"perf" : { "name" : "citrix_load", "scale" :
0.01 }
@@ -4218,9 +4209,11 @@ check_metrics["check_mk_active-disk_smb"] = {
"~.*" : { "name" : "fs_used" }
}
+
+df_basic_perfvarnames = ["inodes_used", "fs_size",
"growth", "trend",
+ "fs_provisioning", "uncommitted",
"overprovisioned"]
df_translation = {
- "~(?!inodes_used|fs_size|growth|trend|fs_provisioning|"
- "uncommitted|overprovisioned).*$" : { "name" :
"fs_used", "scale" : MB },
+ "~(?!%s).*$" % "|".join(df_basic_perfvarnames) : {
"name" : "fs_used", "scale" : MB },
"fs_size" : { "scale" : MB },
"growth" : { "name" : "fs_growth", "scale"
: MB / 86400.0 },
"trend" : { "name" : "fs_trend", "scale" :
MB / 86400.0 },
@@ -4255,6 +4248,33 @@ check_metrics["check_mk-3par_cpgs.usage"]
= df_translation
check_metrics["check_mk-3par_capacity"] =
df_translation
check_metrics["check_mk-3par_volumes"] =
df_translation
+df_netapp_perfvarnames = list(df_basic_perfvarnames)
+for protocol in [ "nfs", "cifs", "san", "fcp",
"iscsi", "nfsv4", "nfsv4_1"]:
+ df_netapp_perfvarnames.append("%s_read_data" % protocol)
+ df_netapp_perfvarnames.append("%s_write_data" % protocol)
+ df_netapp_perfvarnames.append("%s_read_latency" % protocol)
+ df_netapp_perfvarnames.append("%s_write_latency" % protocol)
+
+# TODO: this special regex construct below, needs to be replaced by something managable
+# The current df_translation implementation is unable to automatically detect new
parameters
+check_metrics["check_mk-netapp_api_volumes"] = {
+ "~(?!%s).*$" % "|".join(df_netapp_perfvarnames) : {
"name" : "fs_used", "scale" : MB },
+ "fs_size" : { "scale" : MB },
+ "growth" : { "name" : "fs_growth", "scale"
: MB / 86400.0 },
+ "trend" : { "name" : "fs_trend", "scale" :
MB / 86400.0 },
+ "nfs_read_latency" : { "scale" : m },
+ "nfs_write_latency" : { "scale" : m },
+ "cifs_read_latency" : { "scale" : m },
+ "cifs_write_latency" : { "scale" : m },
+ "san_read_latency" : { "scale" : m },
+ "san_write_latency" : { "scale" : m },
+ "fcp_read_latency" : { "scale" : m },
+ "fcp_write_latency" : { "scale" : m },
+ "iscsi_read_latency" : { "scale" : m },
+ "iscsi_write_latency" : { "scale" : m },
+}
+
+
disk_utilization_translation = { "disk_utilization" : { "scale" :
100.0 } }
check_metrics["check_mk-diskstat"] =
disk_utilization_translation