Module: check_mk
Branch: master
Commit: 0e415bbdfd0980cb5058092ead2073f2ba738d42
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0e415bbdfd0980…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 1 19:10:21 2018 +0100
add todo
Change-Id: Ibbbbc7fea89a13e8d00360487049ca21f470912a
---
cmk_base/modes/check_mk.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cmk_base/modes/check_mk.py b/cmk_base/modes/check_mk.py
index 3f61657..6a6110b 100644
--- a/cmk_base/modes/check_mk.py
+++ b/cmk_base/modes/check_mk.py
@@ -40,6 +40,10 @@ from cmk_base.exceptions import MKAgentError
from cmk_base.modes import modes, Mode, Option, keepalive_option
+# TODO: Investigate all modes and try to find out whether or not we can
+# set needs_checks=False for them. This would save a lot of IO/time for
+# these modes.
+
#.
# .--General options-----------------------------------------------------.
# | ____ _ _ |
Module: check_mk
Branch: master
Commit: c9bc7a00d9c98c7eb4b06cff644c76eeba13ca7b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c9bc7a00d9c98c…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Thu Mar 1 15:38:37 2018 +0100
Win-agent: update code comments
The comments contained now outdated information as eventlog state
offsets are no longer preserved in memory but read every time from
file. Related to a1fb8bc3a01beb2687a1cc90fae85195ba952e87.
---
agents/windows/sections/SectionEventlog.cc | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/agents/windows/sections/SectionEventlog.cc b/agents/windows/sections/SectionEventlog.cc
index 5eb5936..6ba469b 100644
--- a/agents/windows/sections/SectionEventlog.cc
+++ b/agents/windows/sections/SectionEventlog.cc
@@ -434,11 +434,11 @@ void SectionEventlog::handleExistingLog(std::ostream &out,
// the logwatch agent for Linux and UNIX
bool SectionEventlog::produceOutputInner(std::ostream &out) {
Debug(_logger) << "SectionEventlog::produceOutputInner";
- // This agent remembers the record numbers
+ // The agent reads from a state file the record numbers
// of the event logs up to which messages have
- // been processed. When started, the eventlog
- // is skipped to the end. Historic messages are
- // not been processed.
+ // been processed. When no state information is available,
+ // the eventlog is skipped to the end (unless the sendall config
+ // option is used). Historic messages are not been processed.
if (auto states = loadEventlogOffsets(_env.eventlogStatefile(),
*_sendall, _logger);
@@ -448,8 +448,7 @@ bool SectionEventlog::produceOutputInner(std::ostream &out) {
handleExistingLog(out, state);
}
}
- // The offsets are persisted in file after each run as we never know
- // when the agent will be stopped.
+ // The offsets are persisted in a state file.
saveEventlogOffsets(_env.eventlogStatefile(), states);
}
Module: check_mk
Branch: master
Commit: a1fb8bc3a01beb2687a1cc90fae85195ba952e87
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a1fb8bc3a01beb…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Thu Mar 1 15:05:42 2018 +0100
Win-agent: read eventlog offsets every time
Until now, Windows agent read the saved eventlog offsets from the state
file only once, upon startup, and used from then on data stored
(cached) in memory. In preparation for storing the offsets per host /
remote IP address, we need to read the offsets from disk every time the
agent is called and not preserve the offsets in memory as way may be
handling different remote hosts across different agent calls.
---
agents/windows/build_version | 2 +-
agents/windows/sections/SectionEventlog.cc | 164 ++++++++++-----------
agents/windows/sections/SectionEventlog.h | 34 ++---
.../windows/test/sections/SectionEventlogTest.cc | 22 +--
4 files changed, 99 insertions(+), 123 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=a1fb8bc3a0…