Module: check_mk
Branch: master
Commit: f858411f32f36ef96f6c6defe2701e075dfecd4c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f858411f32f36e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 8 14:57:46 2015 +0200
agent_netapp: try to fix exception on missing shelf uid
---
agents/special/agent_netapp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index a1b4cae..577b251 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -142,6 +142,11 @@ def output_environment(results):
if "netapp_api_disk" not in shared_data:
return True
+ # TODO: We had a case where shelf_uid is not contained in
shared_data["netapp_api_disk"]["shelf-uids"].
+ # I (mk) do not know why.
+ if shelf_uid not in
shared_data["netapp_api_disk"]["shelf-uids"]:
+ return False
+
for disk in
shared_data["netapp_api_disk"]["shelf-uids"][shelf_uid]:
state =
shared_data["netapp_api_disk"]["disks"].get(disk)
if state == "partner":