Module: check_mk
Branch: master
Commit: a99c586c056aed3424a925194cbe3eb2a6e8597c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a99c586c056aed…
Author: Sergey Kipnis <sk(a)mathias-kettner.de>
Date: Thu Mar 28 19:55:49 2019 +0100
[CMK-1791] - small improvements
- empty section in user config is allowed
- minimum timeout set to 5 seconds to avoid random dropping WMI output
Change-Id: Ia6c547583824d0ff773581bfad8ab64c1dada4bd
---
agents/wnx/src/common/cfg_info.h | 2 +-
agents/wnx/src/engine/cfg.cpp | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/agents/wnx/src/common/cfg_info.h b/agents/wnx/src/common/cfg_info.h
index 1533f1e..cb342a7 100644
--- a/agents/wnx/src/common/cfg_info.h
+++ b/agents/wnx/src/common/cfg_info.h
@@ -62,7 +62,7 @@ constexpr int kDefaultWinPerfTimeout = 11; // seconds
constexpr int kDefaultAgentMaxWait = 15; // max time agent waits for a sections
// #TODO CONFIRM VALUE:
-constexpr int kDefaultAgentMinWait = 1; // max time agent waits for a sections
+constexpr int kDefaultAgentMinWait = 5; // max time agent waits for a sections
const char* const kDefaultLogFileName = "check_mk.log";
const char* const kDefaultAppFileName = "check_mk_agent.exe";
diff --git a/agents/wnx/src/engine/cfg.cpp b/agents/wnx/src/engine/cfg.cpp
index ed3415b..ca03eca 100644
--- a/agents/wnx/src/engine/cfg.cpp
+++ b/agents/wnx/src/engine/cfg.cpp
@@ -780,7 +780,8 @@ bool ConfigInfo::smartMerge(YAML::Node Target, const YAML::Node Src,
smartMerge(grp, s, merge_seq);
}
} else {
- XLOG::l.bp(XLOG_FLINE + " expected map from source {}", name);
+ if (s.IsNull()) continue; // empty skipped
+ XLOG::l(XLOG_FLINE + " expected map from source {}", name);
}
continue;
} else if (IsYamlSeq(grp)) {