Module: check_mk
Branch: master
Commit: 4688d0338e1208ed0d408225834e160af0ea8009
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4688d0338e1208…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jun 13 11:13:15 2013 +0200
Try to fix exception in WATO when manual checks miss sections
---
modules/automation.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/modules/automation.py b/modules/automation.py
index 195bf92..73f31bd 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -253,8 +253,16 @@ def automation_try_inventory_node(hostname):
# Collect current status information about all existing checks
table = []
for (ct, item), (state_type, paramstring) in found.items():
- params = None
if state_type not in [ 'legacy', 'active' ]:
+ # apply check_parameters
+ try:
+ if type(paramstring) == str:
+ params = eval(paramstring)
+ else:
+ params = paramstring
+ except:
+ raise MKAutomationError("Invalid check parameter string
'%s'" % paramstring)
+
descr = service_description(ct, item)
global g_service_description
g_service_description = descr
@@ -292,14 +300,6 @@ def automation_try_inventory_node(hostname):
if exitcode == None:
check_function = check_info[ct]["check_function"]
- # apply check_parameters
- try:
- if type(paramstring) == str:
- params = eval(paramstring)
- else:
- params = paramstring
- except:
- raise MKAutomationError("Invalid check parameter string
'%s'" % paramstring)
if state_type != 'manual':
params = compute_check_parameters(hostname, ct, item, params)