Module: check_mk
Branch: master
Commit: a40a71ef3c1883dd5292d629b3582253689245b9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a40a71ef3c1883…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Mar 21 11:53:33 2019 +0100
7128 FIX Display vanished and disabled clustered services on discovery page of the nodes
Change-Id: I12241c5dcfb26945c7cbdbea2cc109dba6dba982
---
.werks/7128 | 11 +++++++++++
cmk/gui/wato/pages/services.py | 34 ++++++++++++++++++++++++++++++++++
cmk_base/discovery.py | 13 ++++++-------
3 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/.werks/7128 b/.werks/7128
new file mode 100644
index 0000000..8dc07fb
--- /dev/null
+++ b/.werks/7128
@@ -0,0 +1,11 @@
+Title: Display vanished and disabled clustered services on discovery page of the nodes
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553149689
+
+
diff --git a/cmk/gui/wato/pages/services.py b/cmk/gui/wato/pages/services.py
index bba55ef..5d97db7 100644
--- a/cmk/gui/wato/pages/services.py
+++ b/cmk/gui/wato/pages/services.py
@@ -98,6 +98,8 @@ class DiscoveryState(object):
LEGACY = "legacy"
CLUSTERED_OLD = "clustered_old"
CLUSTERED_NEW = "clustered_new"
+ CLUSTERED_VANISHED = "clustered_vanished"
+ CLUSTERED_IGNORED = "clustered_ignored"
ACTIVE_IGNORED = "active_ignored"
CUSTOM_IGNORED = "custom_ignored"
LEGACY_IGNORED = "legacy_ignored"
@@ -112,6 +114,8 @@ class DiscoveryState(object):
cls.REMOVED,
cls.CLUSTERED_OLD,
cls.CLUSTERED_NEW,
+ cls.CLUSTERED_VANISHED,
+ cls.CLUSTERED_IGNORED,
]
@@ -739,6 +743,18 @@ class ModeAjaxServiceDiscovery(WatoWebApiMode):
autochecks_to_save[(check_type, item)] = paramstring
saved_services.add(descr)
+ elif table_source in [
+ DiscoveryState.CLUSTERED_VANISHED,
+ DiscoveryState.CLUSTERED_IGNORED,
+ ]:
+ # We keep vanished clustered services on the node with the following reason:
+ # If a service is mapped to a cluster then there are already operations
+ # for adding, removing, etc. of this service on the cluster. Therefore we
+ # do not allow any operation for this clustered service on the related node.
+ # We just display the clustered service state (OLD, NEW, VANISHED).
+ autochecks_to_save[(check_type, item)] = paramstring
+ saved_services.add(descr)
+
if apply_changes:
need_sync = False
if remove_disabled_rule or add_disabled_rule:
@@ -1421,6 +1437,15 @@ class DiscoveryPageRenderer(object):
"monitoring."),
),
TableGroupEntry(
+ DiscoveryState.CLUSTERED_VANISHED,
+ show_bulk_actions=False,
+ title=_("Vanished clustered services (located on cluster host)"),
+ help_text=_(
+ "These services have been found on this host and have been mapped to "
+ "a cluster host by a rule in the set <i>Clustered services</i> but disappeared "
+ "from this host."),
+ ),
+ TableGroupEntry(
DiscoveryState.MONITORED,
show_bulk_actions=True,
title=_("Monitored services"),
@@ -1487,6 +1512,15 @@ class DiscoveryPageRenderer(object):
"them."),
),
TableGroupEntry(
+ table_group=DiscoveryState.CLUSTERED_IGNORED,
+ show_bulk_actions=False,
+ title=_("Disabled clustered services (located on cluster host)"),
+ help_text=_(
+ "These services have been found on this host and have been mapped to "
+ "a cluster host by a rule in the set <i>Clustered services</i> but disabled via "
+ "<i>Disabled services</i> or <i>Disabled checks</i>."),
+ ),
+ TableGroupEntry(
table_group=DiscoveryState.ACTIVE_IGNORED,
show_bulk_actions=False,
title=_("Disabled active checks"),
diff --git a/cmk_base/discovery.py b/cmk_base/discovery.py
index ae98174..8a4e6ed 100644
--- a/cmk_base/discovery.py
+++ b/cmk_base/discovery.py
@@ -277,8 +277,8 @@ def discover_on_host(mode,
else:
counts["removed"] += 1
- # Silently keep clustered services
elif check_source.startswith("clustered_"):
+ # Silently keep clustered services
new_items[(check_plugin_name, item)] = paramstring
else:
@@ -888,12 +888,11 @@ def _get_node_services(hostname, ipaddress, sources, multi_host_sections, on_err
else:
continue # ignore
- if hostname != config_cache.host_of_clustered_service(hostname, descr):
- if check_source == "vanished":
- del services[(check_plugin_name,
- item)] # do not show vanished clustered services here
- else:
- services[(check_plugin_name, item)] = ("clustered_" + check_source, paramstring)
+ clustername = config_cache.host_of_clustered_service(hostname, descr)
+ if hostname != clustername:
+ if config.service_ignored(clustername, check_plugin_name, descr):
+ check_source = "ignored"
+ services[(check_plugin_name, item)] = ("clustered_" + check_source, paramstring)
_merge_manual_services(services, hostname, on_error)
return services
Module: check_mk
Branch: master
Commit: 71135ec48209cc2299f60ba43837e769aa8ca92d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=71135ec48209cc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 21 11:03:10 2019 +0100
7242 FIX Unreachable site errors respect site filters
When reports are being created while some distributed site is offline, the
report is prefixed by a "error report" page that is added to inform the user
that the report was created in such a situation and some data may be missing
for this reason.
The error message looks like this: "Not all sites have been queried. Some
information is missing."
The errors were shown for all sites, even when a specific site was queried.
This was a problem, especially in Check_MK Managed Services Edition
environments when creating customer specific reports in the management sites.
Change-Id: Ice1b70be3c1aeef2d689f50f5e6ae2575794688d
---
.werks/7242 | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/.werks/7242 b/.werks/7242
new file mode 100644
index 0000000..9cdf35d
--- /dev/null
+++ b/.werks/7242
@@ -0,0 +1,21 @@
+Title: Unreachable site errors respect site filters
+Level: 1
+Component: reporting
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553017709
+
+When reports are being created while some distributed site is offline, the
+report is prefixed by a "error report" page that is added to inform the user
+that the report was created in such a situation and some data may be missing
+for this reason.
+
+The error message looks like this: "Not all sites have been queried. Some
+information is missing."
+
+The errors were shown for all sites, even when a specific site was queried.
+This was a problem, especially in Check_MK Managed Services Edition
+environments when creating customer specific reports in the management sites.
Module: check_mk
Branch: master
Commit: 31cdad466273849f7c848269e678037fc5138129
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=31cdad46627384…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 21 10:45:11 2019 +0100
7324 FIX Fix inefficient event history filtering by event ID
Queries for specific event IDs were not optimized for the event history queries
which are issues e.g. by the GUI when clicking on the detail page of one event.
Change-Id: If4bd2c03fb58a57a848d9cb1f2dd49689cbba331
---
.werks/7324 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/7324 b/.werks/7324
new file mode 100644
index 0000000..a1fa0f7
--- /dev/null
+++ b/.werks/7324
@@ -0,0 +1,12 @@
+Title: Fix inefficient event history filtering by event ID
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553161471
+
+Queries for specific event IDs were not optimized for the event history queries
+which are issues e.g. by the GUI when clicking on the detail page of one event.
Module: check_mk
Branch: master
Commit: 994ca93bf695ab2040f941354acb867679803bfe
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=994ca93bf695ab…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Mar 21 09:54:34 2019 +0100
Pass integral equality constraints to the EC, too.
Change-Id: I08401fd261f86f0ab96c353b0b19d008537b0a50
---
livestatus/src/TableEventConsole.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/livestatus/src/TableEventConsole.cc b/livestatus/src/TableEventConsole.cc
index e9b9c7f..0f9ce8d 100644
--- a/livestatus/src/TableEventConsole.cc
+++ b/livestatus/src/TableEventConsole.cc
@@ -115,6 +115,15 @@ private:
for (const auto &column_name : grepping_filters) {
if (auto svr = _query->stringValueRestrictionFor(column_name)) {
os << "\nFilter: " << column_name << " = " << *svr;
+ } else {
+ auto glb = _query->greatestLowerBoundFor(column_name);
+ auto lub = _query->leastUpperBoundFor(column_name);
+ if (glb && lub && glb == lub) {
+ os << "\nFilter: " << column_name << " = " << *glb;
+ }
+ // NOTE: We could emit >= or <= constraints for cases where we
+ // know only one bound or the bounds are different, but the EC
+ // can't make use of that currently.
}
}
}
Module: check_mk
Branch: master
Commit: e7c811bc2a3b7723c97bd9b1b5f0cf6537a8b3f9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e7c811bc2a3b77…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Mar 21 10:07:54 2019 +0100
Detect error messages from web service
When the webservice detects an error -- such as an authentication problem --
it does not output a JSON tree by a string starting with ERROR: This is now
correctly being detected and the error is output as check output, rather than
a nasty JSON parsing exception
---
active_checks/check_bi_aggr | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/active_checks/check_bi_aggr b/active_checks/check_bi_aggr
index ae7ab10..c16337f 100755
--- a/active_checks/check_bi_aggr
+++ b/active_checks/check_bi_aggr
@@ -199,6 +199,10 @@ except Exception, e:
'ERROR: Exception while opening URL: %s - %s\n%s' % (url, e, traceback.format_exc()))
sys.exit(3)
+if json.startswith("ERROR:"):
+ sys.stdout.write(json.rstrip() + "\n")
+ sys.exit(3)
+
try:
obj = eval(json)
except Exception, e:
Module: check_mk
Branch: master
Commit: f08eb97c9a845082b0dd4a462a162ecba6b791e9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f08eb97c9a8450…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 21 10:02:36 2019 +0100
7243 FIX Fixed wrong sorting of perfometers when some services have no metrics
When sorting a list of services by the perfometer column, this did not work
correctly in case there were services in this list that have no metrics at
all.
Change-Id: Iff8e759be15da00b1376c0156a1a523341f839e4
---
.werks/7243 | 13 +++++++++++++
cmk/gui/metrics.py | 3 +++
2 files changed, 16 insertions(+)
diff --git a/.werks/7243 b/.werks/7243
new file mode 100644
index 0000000..227f21c
--- /dev/null
+++ b/.werks/7243
@@ -0,0 +1,13 @@
+Title: Fixed wrong sorting of perfometers when some services have no metrics
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553091264
+
+When sorting a list of services by the perfometer column, this did not work
+correctly in case there were services in this list that have no metrics at
+all.
diff --git a/cmk/gui/metrics.py b/cmk/gui/metrics.py
index c8d7e1e..99d8eb5 100644
--- a/cmk/gui/metrics.py
+++ b/cmk/gui/metrics.py
@@ -283,6 +283,9 @@ class Perfometers(object):
return perfometers
def _perfometer_possible(self, perfometer, translated_metrics):
+ if not translated_metrics:
+ return False
+
if self._skip_perfometer_by_trivial_metrics(perfometer["_required_names"],
translated_metrics):
return False