Module: check_mk
Branch: master
Commit: e1e73713a3b3bc0c75fab1b2ab3831509c6e3bb5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e1e73713a3b3bc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 5 10:27:25 2014 +0100
#1701 FIX Correctly show absolute level for CPU load in case of warn/crit
In the check parameters of the CPU load check the levels are given in
load <i>per Core</i>. The check plugin output displayed this as level, but
this was confusing. Now the absolute level is being displayed instead.
---
.werks/1701 | 11 +++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 8 ++++----
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/.werks/1701 b/.werks/1701
new file mode 100644
index 0000000..0e77722
--- /dev/null
+++ b/.werks/1701
@@ -0,0 +1,11 @@
+Title: Correctly show absolute level for CPU load in case of warn/crit
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417771579
+Class: fix
+
+In the check parameters of the CPU load check the levels are given in
+load <i>per Core</i>. The check plugin output displayed this as level, but
+this was confusing. Now the absolute level is being displayed instead.
diff --git a/ChangeLog b/ChangeLog
index 428995a..78f7ee5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -115,6 +115,7 @@
* 1679 FIX: ups_bat_temp: Now skipping sensors which are reported to have 0
upsBatteryTemperature
* 1681 FIX: cmciii_lcp_fans: Skipping non FAN units now; cleaned up check
* 1682 FIX: cmciii_lcp_waterflow: Check can now deal with devices with a different
setup
+ * 1701 FIX: Correctly show absolute level for CPU load in case of warn/crit...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index c4cec73..00008af 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1725,18 +1725,18 @@ def check_levels(value, dsname, params, unit="",
factor=1.0, scale=1.0, statemar
# Critical cases
if crit_upper != None and value >= crit_upper:
state = 2
- infotexts.append("critical level at %.2f%s" % (crit_upper / factor /
scale, unit))
+ infotexts.append("critical level at %.2f%s" % (crit_upper / scale,
unit))
elif crit_lower != None and value <= crit_lower:
state = 2
- infotexts.append("too low: critical level at %.2f%s" % (crit_lower /
factor / scale, unit))
+ infotexts.append("too low: critical level at %.2f%s" % (crit_lower /
scale, unit))
# Warning cases
elif warn_upper != None and value >= warn_upper:
state = 1
- infotexts.append("warning level at %.2f%s" % (warn_upper / factor /
scale, unit))
+ infotexts.append("warning level at %.2f%s" % (warn_upper / scale,
unit))
elif warn_lower != None and value <= warn_lower:
state = 1
- infotexts.append("too low: warning level at %.2f%s" % (warn_lower /
factor / scale, unit))
+ infotexts.append("too low: warning level at %.2f%s" % (warn_lower /
scale, unit))
# OK
else: