Module: check_mk
Branch: master
Commit: 598610d11b1ca27c1f5f0258650dc9763629da17
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=598610d11b1ca2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 16 13:15:14 2017 +0100
Minor output cleanups
Change-Id: I992376394f1f390e8fcec3048f0cd5b172568ce6
---
cmk_base/data_sources/__init__.py | 5 ++++-
cmk_base/data_sources/programs.py | 2 +-
cmk_base/piggyback.py | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/cmk_base/data_sources/__init__.py b/cmk_base/data_sources/__init__.py
index 2b4e106..d8eacb7 100644
--- a/cmk_base/data_sources/__init__.py
+++ b/cmk_base/data_sources/__init__.py
@@ -355,9 +355,12 @@ class DataSources(object):
elif config.is_all_special_agents_host(self._hostname):
return "Use all enabled special agents"
- else:
+ elif config.is_tcp_host(self._hostname):
return "Contact either Check_MK Agent or use a single special
agent"
+ else:
+ return "No agent"
+
def _get_agent_data_source(self, ignore_special_agents=False):
if not ignore_special_agents:
diff --git a/cmk_base/data_sources/programs.py b/cmk_base/data_sources/programs.py
index 5eab732..76cf717 100644
--- a/cmk_base/data_sources/programs.py
+++ b/cmk_base/data_sources/programs.py
@@ -64,7 +64,7 @@ class ProgramDataSource(CheckMKAgentDataSource):
def _get_agent_info_program(self, commandline):
exepath = commandline.split()[0] # for error message, hide options!
- console.vverbose("Calling external program %s\n" % commandline)
+ self._logger.debug("[%s] Calling external program %r" % (self.id(),
commandline))
p = None
try:
if config.monitoring_core == "cmc":
diff --git a/cmk_base/piggyback.py b/cmk_base/piggyback.py
index fb1a780..48eba45 100644
--- a/cmk_base/piggyback.py
+++ b/cmk_base/piggyback.py
@@ -99,7 +99,7 @@ def _get_piggyback_files(hostname):
def store_piggyback_raw_data(sourcehost, piggybacked):
for backedhost, lines in piggybacked.items():
- console.verbose("Storing piggyback data for %s.\n" % backedhost)
+ console.verbose("Storing piggyback data for: %s\n" % backedhost)
content = "\n".join(lines) + "\n"
store.save_file(os.path.join(cmk.paths.tmp_dir, "piggyback",
backedhost, sourcehost), content)