Module: check_mk
Branch: master
Commit: 2a4cd96c60e69bbfd0d3205242a9c1d3630bed15
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2a4cd96c60e69b…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Nov 27 12:28:27 2015 +0100
#2842 FIX jolokia_metrics.perm_gen: fixed wrong calculation of perf variables warn and
crit
---
.werks/2842 | 9 +++++++++
ChangeLog | 1 +
checks/jolokia_metrics | 4 ++--
web/plugins/metrics/check_mk.py | 3 +--
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/.werks/2842 b/.werks/2842
new file mode 100644
index 0000000..b0d236b
--- /dev/null
+++ b/.werks/2842
@@ -0,0 +1,9 @@
+Title: jolokia_metrics.perm_gen: fixed wrong calculation of perf variables warn and crit
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1448623631
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 33cb10a..e321c90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -110,6 +110,7 @@
* 2777 FIX: check_mk_agent.linux: avoid execution of .deb temporary files as plugins
* 2800 FIX: mk_mysql: fixed some issues with incorrect assembled command line...
* 2744 FIX: waitmax now kills the whole process group and is a bit more robust.
+ * 2842 FIX: jolokia_metrics.perm_gen: fixed wrong calculation of perf variables warn
and crit
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/jolokia_metrics b/checks/jolokia_metrics
index 50605e0..d6cc5f4 100644
--- a/checks/jolokia_metrics
+++ b/checks/jolokia_metrics
@@ -840,8 +840,8 @@ def check_jolokia_metrics_perm_gen(item, params, info):
usage_bytes = int(values['PermGenUsage'])
size_bytes = int(values['PermGenMax'])
usage_perc = 100.0 / size_bytes * usage_bytes
- warn_bytes = usage_bytes / 100.0 * warn
- crit_bytes = usage_bytes / 100.0 * crit
+ warn_bytes = size_bytes / 100.0 * warn
+ crit_bytes = size_bytes / 100.0 * crit
perfdata = [("mem_perm_used", usage_bytes, warn_bytes, crit_bytes, 0,
size_bytes)]
state = 0
if usage_perc >= crit:
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 7b09118..5b8fef6 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -465,7 +465,7 @@ metric_info["mem_used_percent"] = {
metric_info["mem_perm_used"] = {
"color": "#80ff40",
- "title" : _("Perm used"),
+ "title" : _("Permanent Generation Memory"),
"unit" : "bytes",
}
@@ -5659,4 +5659,3 @@ graph_info.append({
],
"range" : (0, "mem_perm_used:max")
})
-