Module: check_mk
Branch: master
Commit: 694b1863debfd87398f685e7dca0f3f283a6f8c0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=694b1863debfd8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Nov 24 13:40:07 2015 +0100
omd_status: avoid crash in case of missing OMD site
---
checks/omd_status | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/checks/omd_status b/checks/omd_status
index f2764ec..a9e08b8 100644
--- a/checks/omd_status
+++ b/checks/omd_status
@@ -73,9 +73,12 @@ def parse_omd_status(info):
return parsed
-def check_omd_status(item, _no_params, info):
+def check_omd_status(item, _no_params, parsed):
- parsed_site = info[item]
+ if item not in parsed:
+ return
+
+ parsed_site = parsed[item]
number_nodes = len(parsed_site)
stopped_nodes = 0