Module: check_mk
Branch: master
Commit: 9fa48a4429789674e80ddee2a9632f0029aeaa7f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9fa48a44297896…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 25 13:18:35 2016 +0200
3764 FIX netapp_api_vs_traffic: Fixed exception when no NFSv4 infos available
---
.werks/3764 | 10 ++++++++++
ChangeLog | 1 +
checks/netapp_api_vs_traffic | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/.werks/3764 b/.werks/3764
new file mode 100644
index 0000000..f83e543
--- /dev/null
+++ b/.werks/3764
@@ -0,0 +1,10 @@
+Title: netapp_api_vs_traffic: Fixed exception when no NFSv4 infos available
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1472123889
+
+
diff --git a/ChangeLog b/ChangeLog
index 4f4d3cb..b8f9aec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -351,6 +351,7 @@
* 3774 FIX: apc_symmetra: fixed wrong status and values handling
* 3761 FIX: windows_tasks: Fixed possible exception in discovery in case of
unexpected agent data
* 3762 FIX: local: Fixed long output handling with Microcore...
+ * 3764 FIX: netapp_api_vs_traffic: Fixed exception when no NFSv4 infos available
* 3765 FIX: oracle_asm_diskgroup: Made check more robust against invalid data
received from agent...
Multisite:
diff --git a/checks/netapp_api_vs_traffic b/checks/netapp_api_vs_traffic
index 4a23ace..5e9a9d7 100644
--- a/checks/netapp_api_vs_traffic
+++ b/checks/netapp_api_vs_traffic
@@ -83,7 +83,11 @@ def check_netapp_api_vs_traffic(item, _no_params, parsed):
data = parsed.get("%s.%s" % (protocol, item))
if not data:
continue
+
for what, perfname, perftext, scale, format_func in values:
+ if what not in data:
+ continue
+
rate = get_rate(what, now, int(data[what]) * scale)
yield 0, "%s %s: %s" % (protoname, perftext, format_func(rate)),
[(perfname, rate)]