Module: check_mk
Branch: master
Commit: dbb2777f346183ed1813f41aa872efb92a8dcdbe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dbb2777f346183…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Thu Jun 8 10:41:50 2017 +0200
4790 FIX Fixed scaling for the average in interface services of pnp4nagios graphs
If an interface provides a bandwidth, scaling for the average value was not bandwidth but
hard coded. This is now fixed thanks to Jonathan Vogt.
Change-Id: I0b0b00aa9935c4d3d7246e6c088875335c2acc69
---
.werks/4790 | 10 ++++++++++
pnp-templates/check_mk-if.php | 4 ++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/4790 b/.werks/4790
new file mode 100644
index 0000000..cd02505
--- /dev/null
+++ b/.werks/4790
@@ -0,0 +1,10 @@
+Title: Fixed scaling for the average in interface services of pnp4nagios graphs
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1496911178
+Class: fix
+
+If an interface provides a bandwidth, scaling for the average value was not bandwidth but
hard coded. This is now fixed thanks to Jonathan Vogt.
diff --git a/pnp-templates/check_mk-if.php b/pnp-templates/check_mk-if.php
index 375871d..d836384 100644
--- a/pnp-templates/check_mk-if.php
+++ b/pnp-templates/check_mk-if.php
@@ -143,8 +143,8 @@ if (isset($DS[12])) {
"DEF:outbytesa=$RRDFILE[13]:$DS[13]:MAX ".
"CDEF:intraffica=inbytesa,$unit_multiplier,* ".
"CDEF:outtraffica=outbytesa,$unit_multiplier,* ".
- "CDEF:inmba=intraffica,1048576,/ ".
- "CDEF:outmba=outtraffica,1048576,/ ".
+ "CDEF:inmba=intraffica,$scale,/ ".
+ "CDEF:outmba=outtraffica,$scale,/ ".
"CDEF:minusoutmba=0,outmba,- ".
"LINE:inmba#00a060:\"in (avg) \" ".
"GPRINT:intraffica:LAST:\"%6.1lf %s$unit/s last\" ".