Module: check_mk
Branch: master
Commit: 85386fd44bcaafbd07666f6d2a628bbe2f1dc815
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=85386fd44bcaaf…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Tue Mar 27 16:42:34 2018 +0200
Win-agent: extract SectionHeader
This is the first step of splitting the Section class (hierarchy) to
smaller logical entities. The section header forms its own independent
part of section output and has its own parameters that are independent
from the rest of the section.
Define SectionHeader as a separator-character-templated class that is
used as a member variable of Section. Subsection header is implemented
by subclassing the SectionHeader. In order to use the templated
SectionHeader with std::unique_ptr, define a abstract base class
ISectionHeader that all templated SectionHeaders inherit from.
The next steps in splitting Section will be to extract SectionBody to
its own class hierarchy and to provide a factory for instantiating the
sections.
---
agents/windows/Makefile.am | 1 +
agents/windows/SectionManager.cc | 33 +++++--
agents/windows/build_version | 2 +-
agents/windows/sections/Section.cc | 42 ++++-----
agents/windows/sections/Section.h | 20 ++---
agents/windows/sections/SectionCheckMK.cc | 4 +-
agents/windows/sections/SectionDF.cc | 5 +-
agents/windows/sections/SectionDF.h | 1 -
agents/windows/sections/SectionEventlog.cc | 5 +-
agents/windows/sections/SectionFileinfo.cc | 5 +-
agents/windows/sections/SectionFileinfo.h | 2 -
agents/windows/sections/SectionGroup.cc | 27 ++++--
agents/windows/sections/SectionGroup.h | 7 +-
agents/windows/sections/SectionHeader.h | 105 ++++++++++++++++++++++
agents/windows/sections/SectionLogwatch.cc | 9 +-
agents/windows/sections/SectionMRPE.cc | 4 +-
agents/windows/sections/SectionMem.cc | 5 +-
agents/windows/sections/SectionPS.cc | 5 +-
agents/windows/sections/SectionPS.h | 1 -
agents/windows/sections/SectionPerfcounter.cc | 6 +-
agents/windows/sections/SectionPerfcounter.h | 1 -
agents/windows/sections/SectionPluginGroup.cc | 13 ++-
agents/windows/sections/SectionPluginGroup.h | 2 -
agents/windows/sections/SectionServices.cc | 5 +-
agents/windows/sections/SectionSkype.cc | 2 +-
agents/windows/sections/SectionSpool.cc | 5 +-
agents/windows/sections/SectionSpool.h | 3 -
agents/windows/sections/SectionSystemtime.cc | 4 +-
agents/windows/sections/SectionUptime.cc | 4 +-
agents/windows/sections/SectionWMI.cc | 21 ++++-
agents/windows/sections/SectionWMI.h | 3 +-
agents/windows/sections/SectionWinperf.cc | 4 +-
agents/windows/test/sections/SectionHeaderTest.cc | 67 ++++++++++++++
33 files changed, 326 insertions(+), 97 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=85386fd44b…
Module: check_mk
Branch: master
Commit: 2df7ba9f2c2700849ec15af8e74c563f54b93f03
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2df7ba9f2c2700…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 29 09:37:11 2018 +0200
5941 FIX Fixed nagios using outdated config when not using "cmk -R/-O"
When using "omd start/restart" or the init script etc/init.d/nagios to
start or restart nagios, it was possible that the core started with an
outdated configuration.
During start/restart the nagios init script is working in two steps: 1. config
validation and 2. start/restart of the nagios process. During both steps the
whole object configuration (etc/nagios/conf.d) needs to be processed. To
optimize this the first step is perfoming some precompiling of the read config
files. The result is saved in the file var/nagios/objects.precache and read
by the core during startup instead of the single object config files.
The init script had an option set (CORE_NOVERIFY=yes) in all cases that
prevented the config verification even when executed manually. Without the
config verification the object precache was not updated before the restart,
making the core load an outdated file. The variable CORE_NOVERIFY=yes should
only be set when the config verification has already been done. For example cmk
-R/-O is doing exactly this.
A workaround is to trigger the restarts using "cmk -R".
Change-Id: I92cb76637094e5a136561423fe3a6bbfed2e1267
---
.werks/5941 | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/.werks/5941 b/.werks/5941
new file mode 100644
index 0000000..e320653
--- /dev/null
+++ b/.werks/5941
@@ -0,0 +1,28 @@
+Title: Fixed nagios using outdated config when not using "cmk -R/-O"
+Level: 1
+Component: packages
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1522308528
+Class: fix
+
+When using "omd start/restart" or the init script etc/init.d/nagios to
+start or restart nagios, it was possible that the core started with an
+outdated configuration.
+
+During start/restart the nagios init script is working in two steps: 1. config
+validation and 2. start/restart of the nagios process. During both steps the
+whole object configuration (etc/nagios/conf.d) needs to be processed. To
+optimize this the first step is perfoming some precompiling of the read config
+files. The result is saved in the file var/nagios/objects.precache and read
+by the core during startup instead of the single object config files.
+
+The init script had an option set (CORE_NOVERIFY=yes) in all cases that
+prevented the config verification even when executed manually. Without the
+config verification the object precache was not updated before the restart,
+making the core load an outdated file. The variable CORE_NOVERIFY=yes should
+only be set when the config verification has already been done. For example cmk
+-R/-O is doing exactly this.
+
+A workaround is to trigger the restarts using "cmk -R".