Module: check_mk
Branch: master
Commit: de600209f034974ee9a33b17997770302d1b42aa
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de600209f03497…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 4 09:42:43 2017 +0100
5564 FIX Fixed site filter when using "analyse notification"
When analyzing notifications forwarded from remote sites, the site filter did not work as
intended. The site filter was always using the local (central) site ID as value for OMD_SITE
instead of the origin site.
Change-Id: I6ec79ef298cce27c1dea48e6a5ff6299f62c8701
---
.werks/5564 | 12 ++++++++++++
cmk_base/events.py | 17 +++++++++++++----
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/.werks/5564 b/.werks/5564
new file mode 100644
index 0000000..c4d6e31
--- /dev/null
+++ b/.werks/5564
@@ -0,0 +1,12 @@
+Title: Fixed site filter when using "analyse notification"
+Level: 1
+Component: notifications
+Compatible: compat
+Edition: cee
+Version: 1.5.0i2
+Date: 1512376886
+Class: fix
+
+When analyzing notifications forwarded from remote sites, the site filter did not work as
+intended. The site filter was always using the local (central) site ID as value for OMD_SITE
+instead of the origin site.
diff --git a/cmk_base/events.py b/cmk_base/events.py
index 1f20f1e..7766eae 100644
--- a/cmk_base/events.py
+++ b/cmk_base/events.py
@@ -265,15 +265,24 @@ def add_rulebased_macros(raw_context):
raw_context["CONTACTNAME"] = "check-mk-notify"
-# Add a few further helper variables that are useful in notification and alert plugins
def complete_raw_context(raw_context, with_dump, event_log):
+ """Extend the raw notification context
+
+ This ensures that all raw contexts processed in the notification code has specific variables
+ set. Add a few further helper variables that are useful in notification and alert plugins.
+
+ Please not that this is not only executed on the source system. When notifications are
+ forwarded to another site and the analysis is executed on that site, this function will be
+ executed on the central site. So be sure not to overwrite site specific things.
+ """
raw_keys = list(raw_context.keys())
try:
raw_context["WHAT"] = raw_context.get("SERVICEDESC") and "SERVICE" or "HOST"
- raw_context["MONITORING_HOST"] = socket.gethostname()
- raw_context["OMD_ROOT"] = cmk.paths.omd_root
- raw_context["OMD_SITE"] = cmk.omd_site()
+
+ raw_context.setdefault("MONITORING_HOST", socket.gethostname())
+ raw_context.setdefault("OMD_ROOT", cmk.paths.omd_root)
+ raw_context.setdefault("OMD_SITE", cmk.omd_site())
# The Check_MK Micro Core sends the MICROTIME and no other time stamps. We add
# a few Nagios-like variants in order to be compatible
Module: check_mk
Branch: master
Commit: 72d0a0afec46cd54e95d55f20b3cf31719328804
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=72d0a0afec46cd…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Mon Dec 4 08:23:27 2017 +0100
5414 FIX Windows agent: Exchange Availability Service was broken
The name of the WMI class
Win32_PerfRawData_MSExchangeAvailabilityService_MSExchangeAvailabilityService
was misspelled. As a result, the Exchange Availability Service was broken in
all versions since 1.4.0. The misspelled name was introduced by the
refactoring done in commit c5ee818358e695b01c2f2dbc05ad0713723a37f8.
Change-Id: I4bb354ed43d579b7d8b49d685d5ddab9bebd8d71
---
.werks/5414 | 16 ++++++++++++++++
agents/windows/SectionManager.cc | 2 +-
agents/windows/build_version | 2 +-
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/5414 b/.werks/5414
new file mode 100644
index 0000000..3123ed0
--- /dev/null
+++ b/.werks/5414
@@ -0,0 +1,16 @@
+Title: Windows agent: Exchange Availability Service was broken
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i2
+Date: 1512371847
+Class: fix
+
+The name of the WMI class
+Win32_PerfRawData_MSExchangeAvailabilityService_MSExchangeAvailabilityService
+was misspelled. As a result, the Exchange Availability Service was broken in
+all versions since 1.4.0. The misspelled name was introduced by the
+refactoring done in commit c5ee818358e695b01c2f2dbc05ad0713723a37f8.
+
+
diff --git a/agents/windows/SectionManager.cc b/agents/windows/SectionManager.cc
index e202ed2..e0aa5e2 100644
--- a/agents/windows/SectionManager.cc
+++ b/agents/windows/SectionManager.cc
@@ -146,7 +146,7 @@ void SectionManager::loadStaticSections(Configuration &config) {
(new SectionWMI("msexch_availability", "msexch_availability",
_env, _logger, _winapi))
->withObject(
- L"Win32_PerfRawData_MSExchangeAvailabilityService"))
+ L"Win32_PerfRawData_MSExchangeAvailabilityService_MSExchangeAvailabilityService"))
->withSubSection(
(new SectionWMI("msexch_owa", "msexch_owa", _env, _logger,
_winapi))
diff --git a/agents/windows/build_version b/agents/windows/build_version
index e93610b..fd1dbd8 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3014
+3016
Module: check_mk
Branch: master
Commit: cc6dcb630de19a805c860b21a6910bccb6990bd5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cc6dcb630de19a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 1 15:33:56 2017 +0100
5562 Flap settings can now be configured individually for hosts/services
It is now possible to configure the flaping settings individuall for each
host and service. This was previously only configurable globally via
the global setting "Tuning of flap detection".
No you can use the rulesets "Flap detection settings for hosts" and
"Flap detection settings for services" to configure this using rules.
Change-Id: I2137d9f4d9f7c7bb11a8407aea55f89ffb13ce45
---
.werks/5562 | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/.werks/5562 b/.werks/5562
new file mode 100644
index 0000000..8472f24
--- /dev/null
+++ b/.werks/5562
@@ -0,0 +1,15 @@
+Title: Flap settings can now be configured individually for hosts/services
+Level: 1
+Component: core
+Compatible: compat
+Edition: cee
+Version: 1.5.0i2
+Date: 1512138685
+Class: feature
+
+It is now possible to configure the flaping settings individuall for each
+host and service. This was previously only configurable globally via
+the global setting "Tuning of flap detection".
+
+No you can use the rulesets "Flap detection settings for hosts" and
+"Flap detection settings for services" to configure this using rules.