Module: check_mk
Branch: master
Commit: c6770f3530f1dbc7ce6879860d4e71961632c22c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c6770f3530f1db…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Oct 9 19:05:55 2018 +0200
Fixed integration test after e9355e6a114c1fcb2f648a3b6e4eb0a63f620be7
Change-Id: I90ad485ecfe0828c206a7269f435ee660084c14f
---
cmk_base/data_sources/tcp.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cmk_base/data_sources/tcp.py b/cmk_base/data_sources/tcp.py
index a8993ea..a1339bb 100644
--- a/cmk_base/data_sources/tcp.py
+++ b/cmk_base/data_sources/tcp.py
@@ -213,7 +213,11 @@ class TCPDataSource(CheckMKAgentDataSource):
def _sub_result_only_from(self, agent_info):
agent_only_from = agent_info.get("onlyfrom")
+
ruleset = config.agent_config.get("only_from")
+ if not ruleset:
+ return 0, ''
+
entries = config.host_extra_conf(self._hostname, ruleset)
config_only_from = entries[0] if entries else None
if None in (agent_only_from, config_only_from):