Module: check_mk
Branch: master
Commit: 88e33e19eca2c0aee4b67529271d4ac163aeec89
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=88e33e19eca2c0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 5 20:02:46 2019 +0100
Cleaned up output of "Check_MK" service which contained multiple useless ",
"
Change-Id: Iae577f992c74202aae37686137bb5cea0ca90a17
---
cmk_base/data_sources/tcp.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cmk_base/data_sources/tcp.py b/cmk_base/data_sources/tcp.py
index 0008f13..e65a716 100644
--- a/cmk_base/data_sources/tcp.py
+++ b/cmk_base/data_sources/tcp.py
@@ -238,15 +238,17 @@ class TCPDataSource(CheckMKAgentDataSource):
def _summary_result(self):
agent_info = self._get_agent_info()
status, output, perfdata = super(TCPDataSource, self)._summary_result()
+ infotexts = [output]
for sub_status, sub_output in [
self._sub_result_version(agent_info),
self._sub_result_only_from(agent_info),
]:
status = max(status, sub_status)
- output += ", %s" % sub_output
+ if sub_output:
+ infotexts.append(sub_output)
- return status, output, perfdata
+ return status, ", ".join(infotexts), perfdata
def _is_expected_agent_version(self, agent_version, expected_version):
try: