Module: check_mk
Branch: master
Commit: 2c0d692964a0e2508c0ec067f0c475d84d945861
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2c0d692964a0e2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 21 15:16:36 2015 +0200
#2377 FIX cpu.loads: Fix output of reference for predition (was scaled wrongly by number
of cores)
---
.werks/2377 | 10 ++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2377 b/.werks/2377
new file mode 100644
index 0000000..f010a33
--- /dev/null
+++ b/.werks/2377
@@ -0,0 +1,10 @@
+Title: cpu.loads: Fix output of reference for predition (was scaled wrongly by number of
cores)
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437484563
+
+
diff --git a/ChangeLog b/ChangeLog
index 2cc3802..43b7797 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,6 +65,7 @@
* 2469 FIX: Fixed service discovery on SNMP host having no system description OID
* 2480 FIX: Fixed exception when configuring predictive levels for network
interfaces
* 2376 FIX: Fix parsing of performance data from MRPE based checks
+ * 2377 FIX: cpu.loads: Fix output of reference for predition (was scaled wrongly by
number of cores)
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index e018968..63bb080 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1900,8 +1900,9 @@ def check_levels(value, dsname, params, unit="",
factor=1.0, scale=1.0, statemar
try:
ref_value, ((warn_upper, crit_upper), (warn_lower, crit_lower)) = \
get_predictive_levels(dsname, params, "MAX",
levels_factor=factor * scale)
+
if ref_value:
- infotexts.append("predicted reference: %.2f%s" % (ref_value *
factor / scale, unit))
+ infotexts.append("predicted reference: %.2f%s" % (ref_value /
scale, unit))
else:
infotexts.append("no reference for prediction yet")
except Exception, e: