Module: check_mk
Branch: master
Commit: 4b43881447220e9fa7fe033d001217df4241e1f2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4b43881447220e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Feb 19 16:00:07 2019 +0100
added WK6706: BI availability no longer creates N/A periods if an elements within the BI
was not known at the time
Change-Id: Id5cb9661e006ffe8d8d01c30394152ffc93c61c0
---
.werks/6706 | 18 ++++++++++++++++++
cmk/gui/availability.py | 4 ++++
2 files changed, 22 insertions(+)
diff --git a/.werks/6706 b/.werks/6706
new file mode 100644
index 0000000..b9cfc91
--- /dev/null
+++ b/.werks/6706
@@ -0,0 +1,18 @@
+Title: BI availability no longer creates N/A periods if an element within the BI was not
known at the time
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1550580832
+
+WK:4202 introduced some special handling for BI aggregations:
+
+<tt>
+When computing the availability of a BI aggregation for a time range during which new
hosts or services were added to the monitoring the state of these objects would be
displayed as PEND before point of time they were added. But this is not correct. These
objects where not pending but simply not yet existing and thus not contained in the
aggregation tree at all at that time.
+</tt>
+
+This introduced an side effect, so that some availability reports of an aggregation still
shows N/A even when the
+user has explicitly switched off <tt>Include unmonitored time</tt>.
diff --git a/cmk/gui/availability.py b/cmk/gui/availability.py
index 2759b87..da057d1 100644
--- a/cmk/gui/availability.py
+++ b/cmk/gui/availability.py
@@ -820,6 +820,10 @@ def compute_availability(what, av_rawdata, avoptions):
s = "unmonitored"
if not avoptions["consider"]["unmonitored"]:
consider = False
+ elif state is None:
+ # state is None means that this element was not known at this given
time
+ # So there is no reason for creating a fake pending state
+ consider = False
elif span["in_notification_period"] == 0 and avoptions[
"notification_period"] == "exclude":
consider = False