Module: check_mk
Branch: master
Commit: d0fbee89cc694b1d840a00b3b97a1a5ef8efafe5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0fbee89cc694b…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Sep 18 14:01:31 2018 +0200
6597 FIX netapp_api_vs_traffic: Fixed pending services
Thanks to Christian Hofstädtler for this patch
The netapp_api_vs_traffic service always shows
<tt>Traffic vServer NAME PEND - Cannot compute check result: No time
difference</tt>
Apparently this is caused because the counter key supplied to
get_rate function is not unique when multiple protocols are found.
Change-Id: I8975cb16de07e24ef584352b0504b72ced443444
---
.werks/6597 | 13 +++++++++++++
checks/netapp_api_vs_traffic | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/6597 b/.werks/6597
new file mode 100644
index 0000000..06a5ac0
--- /dev/null
+++ b/.werks/6597
@@ -0,0 +1,13 @@
+Title: netapp_api_vs_traffic: Fixed pending services
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1537271935
+Class: fix
+
+The netapp_api_vs_traffic service always shows
+<tt>Traffic vServer NAME PEND - Cannot compute check result: No time
difference</tt>
+This is caused because the counter key which is used in get_rate
+function is not unique if multiple protocols are found.
diff --git a/checks/netapp_api_vs_traffic b/checks/netapp_api_vs_traffic
index 8e71f60..df8d027 100644
--- a/checks/netapp_api_vs_traffic
+++ b/checks/netapp_api_vs_traffic
@@ -95,7 +95,7 @@ def check_netapp_api_vs_traffic(item, _no_params, parsed):
if what not in data:
continue
- rate = get_rate(what, now, int(data[what]) * scale)
+ rate = get_rate('%s.%s' % (protocol, what), now, int(data[what]) *
scale)
yield 0, "%s %s: %s" % (protoname, perftext, format_func(rate)),
[(perfname, rate)]