Module: check_mk
Branch: master
Commit: 8a3d53d5b612f0ff3d0495ff7f2dbed9b6aafc20
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8a3d53d5b612f0…
Author: Florian Kromer <fk(a)mathias-kettner.de>
Date: Tue Apr 16 14:31:06 2019 +0200
netapp_api_vs_status: add vserver_subtype to special agent output
CMK-1864
Change-Id: Ifa080181c0d86e75871dc62bf64d753600ccf826
---
agents/special/agent_netapp | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index a39c4a5..5db0247 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -1073,15 +1073,16 @@ def process_clustermode(server, netapp_mode, licenses):
def process_vserver_status(server):
vservers = query(server, "vserver-get-iter")
- if vservers:
- print "<<<netapp_api_vs_status:sep(9)>>>"
- vserver_dict = create_dict(vservers, custom_key=["vserver-name"],
is_counter=False)
-
- vserver_info = {}
- for key, values in vserver_dict.items():
- if "state" in values:
- vserver_info[key] = values.get("state")
- print format_dict(vserver_info)
+ if not vservers:
+ return
+ vserver_dict = create_dict(vservers, custom_key=["vserver-name"],
is_counter=False)
+ print "<<<netapp_api_vs_status:sep(9)>>>"
+ for vserver, vserver_data in vserver_dict.iteritems():
+ words = [vserver]
+ for key in ("state", "vserver-subtype"):
+ if vserver_data.get(key):
+ words += [key, str(vserver_data[key])]
+ print '\t'.join(words)
def process_vserver_traffic(server, netapp_mode):