pnpgraph now displays AVERAGE instead of MAX values in all timeframes
Message-ID: <53a851fd.WT0H3oW9ID8qPZg/%ab(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 69f14ec0133631e6793ab7fe82764c50663c63ee
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=69f14ec0133631…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jun 23 18:04:54 2014 +0200
FIX esx_vsphere_hostsystem.cpu_usage: pnpgraph now displays AVERAGE instead of MAX values
in all timeframes
Affected pnptemplates are: check_mk-enterasys_cpu_util,
check_mk-esx_vsphere_hostsystem.cpu_usage, check_mk-innovaphone_cpu
---
.werks/941 | 8 ++++++++
ChangeLog | 1 +
pnp-templates/check_mk-esx_vsphere_hostsystem.cpu_usage.php | 7 ++++---
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/941 b/.werks/941
new file mode 100644
index 0000000..96f6c1f
--- /dev/null
+++ b/.werks/941
@@ -0,0 +1,8 @@
+Title: esx_vsphere_hostsystem.cpu_usage: pnpgraph now displays AVERAGE instead of MAX
values in all timeframes
+Level: 1
+Component: multisite
+Version: 1.2.5i4
+Date: 1403539365
+Class: fix
+
+Affected pnptemplates are: check_mk-enterasys_cpu_util,
check_mk-esx_vsphere_hostsystem.cpu_usage, check_mk-innovaphone_cpu
diff --git a/ChangeLog b/ChangeLog
index 4ddd575..7faf755 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,7 @@
* 0938 FIX: logwatch: fixed incorrect display of warning messages
* 0939 FIX: Fixed multisite exception caused by missing explanation text for a
AUTODELETE event action
* 0822 FIX: Sorting columns in view dashlets is now working again
+ * 0941 FIX: esx_vsphere_hostsystem.cpu_usage: pnpgraph now displays AVERAGE instead
of MAX values in all timeframes...
WATO:
* 0987 New button for updating DNS cache...
diff --git a/pnp-templates/check_mk-esx_vsphere_hostsystem.cpu_usage.php
b/pnp-templates/check_mk-esx_vsphere_hostsystem.cpu_usage.php
index 0896ac5..59b1603 100644
--- a/pnp-templates/check_mk-esx_vsphere_hostsystem.cpu_usage.php
+++ b/pnp-templates/check_mk-esx_vsphere_hostsystem.cpu_usage.php
@@ -27,6 +27,7 @@
$RRD = array();
foreach ($NAME as $i => $n) {
$RRD[$n] = "$RRDFILE[$i]:$DS[$i]:MAX";
+ $RRD_AVG[$n] = "$RRDFILE[$i]:$DS[$i]:AVERAGE";
$WARN[$n] = $WARN[$i];
$CRIT[$n] = $CRIT[$i];
$MIN[$n] = $MIN[$i];
@@ -40,7 +41,7 @@ $rightscale = 100.0 / $num_threads;
$opt[1] = "--vertical-label 'Used CPU threads' --right-axis $rightscale:0
--right-axis-format '%4.1lf%%' --right-axis-label 'Utilization %' -l0 -ru
$num_threads --title \"CPU Utilization for $hostname ($num_threads CPU
threads)\" ";
-$def[1] = "DEF:perc=$RRD[util] "
+$def[1] = "DEF:perc=$RRD_AVG[util] "
. "CDEF:util=perc,$num_threads,*,100,/ "
;
@@ -58,8 +59,8 @@ $def[1] .= "AREA:util#60f020:\"Utilization\:\" "
;
-if (isset($RRD["avg"])) {
- $def[1] .= "DEF:aperc=$RRD[avg] ".
+if (isset($RRD_AVG["avg"])) {
+ $def[1] .= "DEF:aperc=$RRD_AVG[avg] ".
"CDEF:avg=aperc,$num_threads,*,100,/ ".
"LINE:avg#004000:\"Averaged\: \" ".
"GPRINT:aperc:LAST:\"%.1lf%%,\" ".