Module: check_mk
Branch: master
Commit: fa8a2b19401f49c23c2bda1421829a5aa44e9a8e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fa8a2b19401f49…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Nov 26 15:51:03 2015 +0100
#2803 netapp_api_volumes: clustered volumes now longer show the current node name in the
service description
Previously, the volume checks went UNKNOWN on a cluster failover.
The service description for clustered volumes has changed from
<i>"{node}.{volume_name}"</i> to
<i>"{volume_name}"</i>.
---
.werks/2803 | 10 ++++++++++
ChangeLog | 2 ++
agents/special/agent_netapp | 4 +++-
checks/netapp_api_volumes | 9 +++++++--
4 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/.werks/2803 b/.werks/2803
new file mode 100644
index 0000000..86d6bda
--- /dev/null
+++ b/.werks/2803
@@ -0,0 +1,10 @@
+Title: netapp_api_volumes: clustered volumes now longer show the current node name in the
service description
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i4
+Date: 1448549213
+Class: feature
+
+Previously, the volume checks went UNKNOWN on a cluster failover.
+The service description for clustered volumes has changed from
<i>"{node}.{volume_name}"</i> to
<i>"{volume_name}"</i>.
diff --git a/ChangeLog b/ChangeLog
index 7701a7b..cae7f8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,8 @@
* 2840 barracuda_mail_latency, barracuda_mailqueues, barracuda_system_cpu_util: new
checks for Barracuda SPAM Firewall Appliance...
* 2865 fortigate_memory_base: added check for fortigate firewall memory usage...
* 2841 emcvnx_writecache: the check monitors the write cache state of the storage
processors of an EMC VNX Storage System
+ * 2803 netapp_api_volumes: clustered volumes now longer show the current node name in
the service description...
+ NOTE: Please refer to the migration notes!
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index fc2b14a..01f74ca 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -79,7 +79,7 @@ OPTIONS:
user = None
secret = None
-opt_timeout = 60
+opt_timeout = 120
opt_debug = False
opt_dump_xml = False
opt_no_counters = []
@@ -519,12 +519,14 @@ if netapp_mode == "clustermode":
"volume-state-attributes.state",
"volume-id-attributes.name",
"volume-id-attributes.node",
+
"volume-id-attributes.msid",
"volume-inode-attributes.files-total",
"volume-inode-attributes.files-used" ],
config_rename = {
"volume-space-attributes.size-available": "size-available",
"volume-space-attributes.size-total" : "size-total",
"volume-state-attributes.state" : "state",
"volume-id-attributes.name" : "name",
+
"volume-id-attributes.msid" : "msid",
"volume-id-attributes.node" : "node",
"volume-inode-attributes.files-total" : "files-total",
"volume-inode-attributes.files-used" : "files-used" },
diff --git a/checks/netapp_api_volumes b/checks/netapp_api_volumes
index 6d88c59..6cb088c 100644
--- a/checks/netapp_api_volumes
+++ b/checks/netapp_api_volumes
@@ -36,9 +36,14 @@ def parse_netapp_api_volumes(info):
tokens = element.split(" ", 1)
volume[tokens[0]] = tokens[1]
- # In clustermode the name is composed out of node.name
+ # Clustermode specific
if "node" in volume:
- name = "%s.%s" % (volume["node"],
volume["name"])
+ # 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"]
+
volumes[name] = volume
return volumes