Module: check_mk
Branch: master
Commit: eeed19111fb284c97be546d9c5d36951a6a09d9f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eeed19111fb284…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Nov 11 14:10:53 2015 +0100
#2786 FIX agent_netapp: now able to monitor more than 20 instances of a given type, e.g.
volumes or interfaces
The netapp agent was unable to output more than 20 instances.
This value was used as default when elements got queried with the help of an iterator.
---
.werks/2786 | 10 ++++++++++
ChangeLog | 1 +
agents/special/agent_netapp | 8 +++++++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/2786 b/.werks/2786
new file mode 100644
index 0000000..231c97a
--- /dev/null
+++ b/.werks/2786
@@ -0,0 +1,10 @@
+Title: agent_netapp: now able to monitor more than 20 instances of a given type, e.g.
volumes or interfaces
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1447247271
+Class: fix
+
+The netapp agent was unable to output more than 20 instances.
+This value was used as default when elements got queried with the help of an iterator.
diff --git a/ChangeLog b/ChangeLog
index e7c9e05..dea1279 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,6 +68,7 @@
* 2701 FIX: zfsget: fixed handling in case of zero total size based on buggy 'df
-h' command on some solaris systems...
* 2702 FIX: oracle_diva_csm: fixed handling of empty sublists
* 2761 FIX: check_http: Fixed handling of multiple strings given as "Strings to
expect in server response"
+ * 2786 FIX: agent_netapp: now able to monitor more than 20 instances of a given type,
e.g. volumes or interfaces...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index a5c6ca2..65b3ba1 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -264,7 +264,13 @@ def query_nodes(what, only_first = False, node_attribute =
"node-name"):
section_errors = []
def query(what, return_toplevel_node = False):
- response = server.invoke(what)
+ # HACK: if "what" endswith get-iter, add max_records = 5000
+ # This approach is way easier than reading the tag, invoke another
+ # command and merge all answers together
+ if what.endswith("get-iter"):
+ response = server.invoke(what, "max-records", 5000)
+ else:
+ response = server.invoke(what)
if response.results_status() == "failed":
section_errors.append("In class %s: %s" % (what,
response.results_reason()))