Module: check_mk
Branch: master
Commit: 1b71cae033e65979de0cb75ac9f6abf2d60d871c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b71cae033e659…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jul 24 17:34:42 2014 +0200
1076 FIX Fix wrong percentual host availability > 100% when excluding downtimes
When you chose to exclude scheduled downtimes from the "100%" then hosts with
actual downtime periods could get an availability for more then 100%. This has
been fixed. The Settings <i>ignore</i> and <i>honor</i> were not
affected. Also
not the display of absolute time values.
---
.werks/1076 | 12 ++++++++++++
ChangeLog | 1 +
web/plugins/views/availability.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/1076 b/.werks/1076
new file mode 100644
index 0000000..51d6046
--- /dev/null
+++ b/.werks/1076
@@ -0,0 +1,12 @@
+Title: Fix wrong percentual host availability > 100% when excluding downtimes
+Level: 2
+Component: reporting
+Class: fix
+State: unknown
+Version: 1.2.5i5
+Date: 1406215992
+
+When you chose to exclude scheduled downtimes from the "100%" then hosts with
+actual downtime periods could get an availability for more then 100%. This has
+been fixed. The Settings <i>ignore</i> and <i>honor</i> were not
affected. Also
+not the display of absolute time values.
diff --git a/ChangeLog b/ChangeLog
index aa916c2..c5b4196 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -108,6 +108,7 @@
Reporting & Availability:
* 0991 FIX: Availability: optionally show time stamps as UNIX epoch time...
+ * 1076 FIX: Fix wrong percentual host availability > 100% when excluding
downtimes...
Event Console:
* 1040 FIX: Avoid sporadic errors when checking event state in Event Console...
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index 58b48c5..ec12741 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -754,9 +754,9 @@ def do_render_availability(rows, what, avoptions, timeline,
timewarpcode):
elif s == "host_down":
s = avoptions["state_grouping"]["host_down"]
- timeline_rows.append((span, s))
total_duration += span["duration"]
if consider:
+ timeline_rows.append((span, s))
considered_duration += span["duration"]
# Now merge consecutive rows with identical state