Module: check_mk
Branch: master
Commit: 0a28118444d5a79e8fa52ea585c47ad9f8d00b31
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a28118444d5a7…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jul 11 13:54:36 2014 +0200
FIX brocade_fcport: fix perfometer output of out bandwidth when averaging is switched on
---
.werks/632 | 8 ++++++++
ChangeLog | 4 ++--
checks/brocade_fcport | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/632 b/.werks/632
new file mode 100644
index 0000000..03ce64e
--- /dev/null
+++ b/.werks/632
@@ -0,0 +1,8 @@
+Title: brocade_fcport: fix perfometer output of out bandwidth when averaging is switched
on
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405079618
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 6efc856..4b4f3d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,10 +41,10 @@
* 1072 FIX: printer_supply: fix colors of Perf-O-Meter on HP OfficeJet...
* 0950 FIX: check_mkevents: now able to resolve the hostname of the remote hosts...
* 0177 FIX: esx_vsphere_hostsystem.multipath: Fixed return state in case of paths in
standby...
- * 0631 FIX: fc_port: several fixes for the perfometer to display the right values...
* 1054 FIX: mysql_slave: Only monitor the age of the slave when it is running
* 1075 FIX: if, if64: Fixed PNP template in order to correctly scale Y axis
->>>>>>> bcba05372bed424e874f785cfd1c9c3be896a516
+ * 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
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/checks/brocade_fcport b/checks/brocade_fcport
index 55178cd..b8e9d04 100644
--- a/checks/brocade_fcport
+++ b/checks/brocade_fcport
@@ -109,6 +109,7 @@ def check_brocade_fcport(item, params, info):
summarystate = 0
output = []
perfdata = []
+ perfaverages = []
# Lookup port speed in ISL table for ISL ports (older switches do not provide this
# information in the normal table)
@@ -166,7 +167,7 @@ def check_brocade_fcport(item, params, info):
if average:
timedif, value = get_average("brocade_fcport.%s.%s.avg" %
(what, item), this_time, value, average)
output.append("Avg(%dmin): %s/s" % (average,
get_bytes_human_readable(value)))
- perfdata.append( ("%s_avg" % what.lower(), value, warn_bytes,
crit_bytes, 0, wirespeed))
+ perfaverages.append( ("%s_avg" % what.lower(), value,
warn_bytes, crit_bytes, 0, wirespeed))
# handle levels for in/out
if crit_bytes != None and value >= crit_bytes:
@@ -176,6 +177,9 @@ def check_brocade_fcport(item, params, info):
summarystate = max(1, summarystate)
output.append(" >= %s/s(!!)" %
(get_bytes_human_readable(warn_bytes)))
+ # put perfdata of averages after perfdata for in and out in order not to confuse
the perfometer
+ perfdata.extend(perfaverages)
+
# R X F R A M E S & T X F R A M E S
# Put number of frames into performance data (honor averaging)
timedif, rxframes_rate = get_counter("brocade_fcport.rxframes.%s" %
index, this_time, rxframes)