Module: check_mk
Branch: master
Commit: a03d11ce1cc081239c959dd5abdb8e1a852f873d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a03d11ce1cc081…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 27 10:49:27 2019 +0100
Fixed broken nagios config precompile (when using logwatch.ec)
Change-Id: I931c0d70f36942142e42dae433c4d17b4330e222
---
cmk_base/core_nagios.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cmk_base/core_nagios.py b/cmk_base/core_nagios.py
index d9e7677..3a21e55 100644
--- a/cmk_base/core_nagios.py
+++ b/cmk_base/core_nagios.py
@@ -1005,6 +1005,8 @@ def _precompile_hostcheck(hostname):
console.verbose("%s%s%-16s%s:", tty.bold, tty.blue, hostname, tty.normal,
stream=sys.stderr)
+ check_api_utils.set_hostname(hostname)
+
compiled_filename = cmk.utils.paths.precompiled_hostchecks_dir + "/" +
hostname
source_filename = compiled_filename + ".py"
for fname in [compiled_filename, source_filename]: