Module: check_mk
Branch: master
Commit: 4cb5f8e4b8d5bc29372f9e63f5b23fd487f4c6bf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4cb5f8e4b8d5bc…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jun 15 14:20:49 2016 +0200
3545 FIX netapp_api_vs_traffic: fixed crash when NFSv4.1 information was available
---
.werks/3545 | 9 +++++++++
ChangeLog | 1 +
checks/netapp_api_vs_traffic | 4 +---
web/plugins/metrics/check_mk.py | 14 +++++++++-----
4 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/.werks/3545 b/.werks/3545
new file mode 100644
index 0000000..c60f409
--- /dev/null
+++ b/.werks/3545
@@ -0,0 +1,9 @@
+Title: netapp_api_vs_traffic: fixed crash when NFSv4.1 information was available
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i1
+Date: 1465993111
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index e727497..1956125 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -270,6 +270,7 @@
* 3636 FIX: juniper_fru: fixed present state handling
* 3142 FIX: windows agent: fixed rare crash when wmi query for uptime fails...
* 3637 FIX: ipmi_sensors: fixed sensor discovery if sensor is unknown and perfdata
handling
+ * 3545 FIX: netapp_api_vs_traffic: fixed crash when NFSv4.1 information was
available
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/netapp_api_vs_traffic b/checks/netapp_api_vs_traffic
index 4fd48b2..4a23ace 100644
--- a/checks/netapp_api_vs_traffic
+++ b/checks/netapp_api_vs_traffic
@@ -73,10 +73,8 @@ def check_netapp_api_vs_traffic(item, _no_params, parsed):
[ ("nfsv4_read_ops", "nfsv4_read_ios",
"read OPs", 1, int),
("nfsv4_write_ops", "nfsv4_write_ios",
"write OPs", 1, int)]),
- # Untested: This value might be wrong
"nfsv4_1": ("NFSv4.1",
- [ ("nfsv4_1_read_ops", "nfsv4_1_read_ios",
"read OPs", 1, int),
- ("nfsv4_1_write_ops", "nfsv4_1_write_ios",
"write OPs", 1, int)]),
+ [ ("nfsv4_1_ops", "nfsv4_1_ios",
"OPs", 1, int) ])
}
vserver = item.split(" ", 3)
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index d2fc2e3..82e2a63 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -2756,25 +2756,29 @@ metric_info["http_bandwidth"] = {
"color" : "53/b",
}
-# netapp api volumes
-
-for volume_info in [ "NFS", "NFSv4", "NFSv4_1",
"CIFS", "SAN", "FCP", "ISCSI" ]:
+for volume_info in [ "NFS", "NFSv4", "CIFS",
"SAN", "FCP", "ISCSI" ]:
for what, unit in [ ("data", "bytes"), ("latency",
"s"), ("ios", "1/s") ]:
volume = volume_info.lower()
- metric_info[ "%s_read_%s" % (volume, what) ] = {
+ metric_info["%s_read_%s" % (volume, what)] = {
"title" : _( "%s read %s" % (volume_info, what) ),
"unit" : unit,
"color" : "31/a",
}
- metric_info[ "%s_write_%s" % (volume, what) ] = {
+ metric_info["%s_write_%s" % (volume, what)] = {
"title" : _( "%s write %s" % (volume_info, what) ),
"unit" : unit,
"color" : "44/a",
}
+metric_info["nfsv4_1_ios"] = {
+ "title" : _( "NFSv4.1 operations"),
+ "unit" : "1/s",
+ "color" : "31/a",
+}
+
metric_info["harddrive_power_cycles"] = {
"title" : _("Harddrive power cycles"),
"unit" : "count",