Module: check_mk
Branch: master
Commit: 0671ac4484215bf09d8e8f670d50a3e858b6cbbb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0671ac4484215b…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Tue Jul 15 15:17:43 2014 +0200
FIX Max Bandwidth for PNP-Graphs of Interface checks corrected
The maximum bandwith of a network interfaces was falsely converted
to the unit MiByte/sec, instead of MByte/sec. Example: 1 GBit/sec was
converted to 119.2 (MiByte/sec), it now is 125 MByte/sec.
---
.werks/634 | 10 ++++++++++
ChangeLog | 1 +
pnp-templates/check_mk-if.php | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/634 b/.werks/634
new file mode 100644
index 0000000..1feaf25
--- /dev/null
+++ b/.werks/634
@@ -0,0 +1,10 @@
+Title: Max Bandwidth for PNP-Graphs of Interface checks corrected
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405429992
+Class: fix
+
+The maximum bandwith of a network interfaces was falsely converted
+to the unit MiByte/sec, instead of MByte/sec. Example: 1 GBit/sec was
+converted to 119.2 (MiByte/sec), it now is 125 MByte/sec.
diff --git a/ChangeLog b/ChangeLog
index 37de5fc..d63f6ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,7 @@
* 1075 FIX: if, if64: Fixed PNP template in order to correctly scale Y axis
* 0631 FIX: fc_port: several fixes for the perfometer to display the right values...
* 0632 FIX: brocade_fcport: fix perfometer output of out bandwidth when averaging is
switched on
+ * 0634 FIX: Max Bandwidth for PNP-Graphs of Interface checks corrected...
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/pnp-templates/check_mk-if.php b/pnp-templates/check_mk-if.php
index 71a869d..86f197b 100644
--- a/pnp-templates/check_mk-if.php
+++ b/pnp-templates/check_mk-if.php
@@ -50,7 +50,7 @@ if (!strcmp($MIN[11], "0.0")) {
else {
$unit = "B";
$unit_multiplier = 1;
- $base = 1024; // Megabyte is 1024 * 1024
+ $base = 1000; // Megabyte is 1000 * 1000
}
# Convert bytes to bits if neccessary
@@ -58,7 +58,7 @@ $bandwidth = $MAX[1] * $unit_multiplier;
$warn = $WARN[1] * $unit_multiplier;
$crit = $CRIT[1] * $unit_multiplier;
-# Now choose a conveniant scale, based on the known bandwith of
+# Now choose a convenient scale, based on the known bandwith of
# the interface, and break down bandwidth, warn and crit by that
# scale.
$bwuom = ' ';