Module: check_mk
Branch: master
Commit: a268d0d84d06c472944ed9fb7d02f22930dd7f33
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a268d0d84d06c4…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Aug 24 14:06:02 2017 +0200
4817 netapp_api_vs_traffic: Extend check by nfs values
Change-Id: Ib896fb293c2198f334c28215a6c8bca2b501f5d9
---
.werks/4817 | 10 ++++++++++
checks/netapp_api_vs_traffic | 18 +++++++++++++-----
web/plugins/metrics/check_mk.py | 19 ++++++++++++++++---
3 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/.werks/4817 b/.werks/4817
new file mode 100644
index 0000000..3b21f9c
--- /dev/null
+++ b/.werks/4817
@@ -0,0 +1,10 @@
+Title: netapp_api_vs_traffic: Extend check by nfs values
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1503576293
+Class: feature
+
+
diff --git a/checks/netapp_api_vs_traffic b/checks/netapp_api_vs_traffic
index 5e9a9d7..2b752f4 100644
--- a/checks/netapp_api_vs_traffic
+++ b/checks/netapp_api_vs_traffic
@@ -66,15 +66,23 @@ def check_netapp_api_vs_traffic(item, _no_params, parsed):
("write_data", "iscsi_write_data",
"write data", 1, get_bytes_human_readable)]),
"nfsv3": ("NFS",
- [ ("nfsv3_read_ops", "nfs_read_ios",
"read OPs", 1, int),
- ("nfsv3_write_ops", "nfs_write_ios",
"write OPs", 1, int)]),
+ [ ("nfsv3_read_ops", "nfs_read_ios",
"read OPs", 1, int),
+ ("nfsv3_write_ops", "nfs_write_ios",
"write OPs", 1, int),
+ ("nfsv3_read_throughput", "nfs_read_throughput",
"read throughput", 1, lambda x: get_bytes_human_readable(x) +
"/s"),
+ ("nfsv3_write_throughput", "nfs_write_throughput",
"write throughput", 1, lambda x: get_bytes_human_readable(x) +
"/s"),
+ ("nfsv3_ops", "nfs_ios",
"OPs", 1, int)]),
"nfsv4": ("NFSv4",
- [ ("nfsv4_read_ops", "nfsv4_read_ios",
"read OPs", 1, int),
- ("nfsv4_write_ops", "nfsv4_write_ios",
"write OPs", 1, int)]),
+ [ ("nfsv4_read_ops", "nfsv4_read_ios",
"read OPs", 1, int),
+ ("nfsv4_write_ops", "nfsv4_write_ios",
"write OPs", 1, int),
+ ("nfs4_read_throughput", "nfsv4_read_throughput",
"read throughput", 1, lambda x: get_bytes_human_readable(x) +
"/s"),
+ ("nfs4_write_throughput", "nfsv4_write_throughput",
"write throughput", 1, lambda x: get_bytes_human_readable(x) +
"/s"),
+ ("nfsv4_ops", "nfsv4_ios",
"OPs", 1, int)]),
"nfsv4_1": ("NFSv4.1",
- [ ("nfsv4_1_ops", "nfsv4_1_ios",
"OPs", 1, int) ])
+ [ ("nfsv4_1_ops", "nfsv4_1_ios",
"OPs", 1, int),
+ ("nfs41_read_throughput",
"nfsv4_1_read_throughput", "read throughput", 1, lambda x:
get_bytes_human_readable(x) + "/s"),
+ ("nfs41_write_throughput",
"nfsv4_1_write_throughput", "write throughput", 1, lambda x:
get_bytes_human_readable(x) + "/s")])
}
vserver = item.split(" ", 3)
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index b5335b2..f3884c6 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -3142,10 +3142,11 @@ metric_info["time_transfer"] = {
"color" : "41/a",
}
-for volume_info in [ "NFS", "NFSv4", "CIFS",
"SAN", "FCP", "ISCSI" ]:
- for what, unit in [ ("data", "bytes"), ("latency",
"s"), ("ios", "1/s") ]:
+for volume_info in [ "NFS", "NFSv4", "NFSv4.1",
"CIFS", "SAN", "FCP", "ISCSI" ]:
+ for what, unit in [ ("data", "bytes"), ("latency",
"s"), ("ios", "1/s"),
+ ("throughput", "bytes/s")]:
- volume = volume_info.lower()
+ volume = volume_info.lower().replace(".", "_")
metric_info["%s_read_%s" % (volume, what)] = {
"title" : _( "%s read %s") % (volume_info, what),
@@ -3159,6 +3160,18 @@ for volume_info in [ "NFS", "NFSv4",
"CIFS", "SAN", "FCP", "ISCSI" ]:
"color" : "44/a",
}
+metric_info["nfs_ios"] = {
+ "title" : _( "NFS operations"),
+ "unit" : "1/s",
+ "color" : "31/a",
+}
+
+metric_info["nfsv4_ios"] = {
+ "title" : _( "NFSv4 operations"),
+ "unit" : "1/s",
+ "color" : "31/a",
+}
+
metric_info["nfsv4_1_ios"] = {
"title" : _( "NFSv4.1 operations"),
"unit" : "1/s",