Module: check_mk
Branch: master
Commit: d92641e86675a22b0307f68375723479f128e998
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d92641e86675a2…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Oct 22 16:31:43 2015 +0200
fixed: service description and some other globals weren't always available during
precompile_params
---
modules/check_mk.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 261dd5d..7888b78 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3478,6 +3478,12 @@ def get_precompiled_check_table(hostname, remove_duplicates=True,
world="config"
host_checks = get_sorted_check_table(hostname, remove_duplicates, world)
precomp_table = []
for check_type, item, params, description, deps in host_checks:
+ # make these globals available to the precompile function
+ global g_service_description, g_check_type, g_checked_item
+ g_service_description = description
+ g_check_type = check_type
+ g_checked_item = item
+
aggr_name = aggregated_service_name(hostname, description)
params = get_precompiled_check_parameters(hostname, item, params, check_type)
precomp_table.append((check_type, item, params, description, aggr_name)) # deps
not needed while checking