Module: check_mk
Branch: master
Commit: be7bf548cfe0b1588cc0ef249ea7a85a6f4b1519
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=be7bf548cfe0b1…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon May 15 11:31:27 2017 +0200
4698 FIX netapp_api_volumes: Changed service description for clustermode volumes
The service description for clustermode volumes now always consists of the SVM name and
the
volume name. The old description used the node name and the volume name, which was not
sufficient
to uniquely identify the volume.
Change-Id: Ia1543b53a2f37e8d32fdd16e31564b4b95272325
---
.werks/4698 | 13 +++++++++++++
agents/special/agent_netapp | 2 +-
checks/netapp_api_volumes | 8 ++------
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/.werks/4698 b/.werks/4698
new file mode 100644
index 0000000..1fda5ca
--- /dev/null
+++ b/.werks/4698
@@ -0,0 +1,13 @@
+Title: netapp_api_volumes: Changed service description for clustermode volumes
+Level: 1
+Component: checks
+Compatible: incomp
+Edition: cre
+Version: 1.5.0i1
+Date: 1494840344
+Class: fix
+
+The service description for clustermode volumes now always consists of the SVM name and
the
+volume name. The old description used the node name and the volume name, which was not
sufficient
+to uniquely identify the volume.
+
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index dabdfb9..0722baf 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -1052,7 +1052,7 @@ try:
"volume-inode-attributes.files-used" : "files-used" },
extra_info = create_dict(volume_counters,
custom_key = [ "instance_uuid" ]),
extra_info_report = sum(map(lambda x:
["%s" % x, "nfs_%s" % x, "cifs_%s" % x, "san_%s" %
x, "fcp_%s" % x, "iscsi_%s" % x],
- sum(map(lambda x:
["read_%s" % x, "write_%s" % x], ["data",
"latency", "ops"]), [])), []) + [ "instance_name" ],
+ sum(map(lambda x:
["read_%s" % x, "write_%s" % x], ["data",
"latency", "ops"]), [])), []) + [ "instance_name",
"vserver_name" ],
skip_missing_config_key = True
)
diff --git a/checks/netapp_api_volumes b/checks/netapp_api_volumes
index f2f4f46..74d5709 100644
--- a/checks/netapp_api_volumes
+++ b/checks/netapp_api_volumes
@@ -37,12 +37,8 @@ def parse_netapp_api_volumes(info):
volume[tokens[0]] = tokens[1]
# Clustermode specific
- if "node" in volume:
- # There are cluster volumes and volumes which only exist on the node.
- if "msid" not in volume:
- name = "%s.%s" % (volume["node"],
volume["name"])
- else:
- name = volume["name"]
+ if "vserver_name" in volume:
+ name = "%s.%s" % (volume["vserver_name"],
volume["name"])
volumes[name] = volume