Module: check_mk
Branch: master
Commit: 1198587a3fda6a3cf477b2d6dedffbaa2c99a89f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1198587a3fda6a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 26 08:04:01 2019 +0200
Move long output log ruleset processing to HostConfig/ConfigCache
CMK-2030
Change-Id: I61fdb1ac87d5892bfa21120debd6de36705033d0
---
cmk_base/config.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/cmk_base/config.py b/cmk_base/config.py
index 2294a81..943dd7c 100644
--- a/cmk_base/config.py
+++ b/cmk_base/config.py
@@ -3635,6 +3635,14 @@ class CEEConfigCache(ConfigCache):
return values[0]
+ def log_long_output_of_service(self, hostname, description):
+ # type: (str, Text) -> bool
+ entries = self.service_extra_conf(hostname, description,
+ cmc_service_long_output_in_monitoring_history)
+ if not entries:
+ return False
+ return entries[0]
+
# TODO: Find a clean way to move this to cmk_base.cee. This will be possible once the
# configuration settings are not held in cmk_base.config namespace anymore.
@@ -3662,3 +3670,12 @@ class CEEHostConfig(HostConfig):
return cmc_flap_settings
return values[0]
+
+ @property
+ def log_long_output(self):
+ # type: () -> bool
+ entries = self._config_cache.host_extra_conf(self.hostname,
+
cmc_host_long_output_in_monitoring_history)
+ if not entries:
+ return False
+ return entries[0]