Module: check_mk
Branch: master
Commit: 461809359b0842f83ec7f498e2b1e3309832ce25
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=461809359b0842…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 26 16:55:53 2012 +0100
FIX: if64: fix link speed on 10GBit
---
ChangeLog | 2 ++
checks/if64 | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e099aa2..20799de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,8 @@
* HP-UX Agent: fix mrpe (remove echo -e and test -e, thanks to Philipp Lemke)
* FIX: ntp checks: output numeric data also if stratum too high
* Linux agent: new check for dmraid-based "bios raid" (agent part as
plugin)
+ * FIX: if64 now uses ifHighSpeed instead of ifSpeed for determining the
+ link speed (fixes speed of 10GBit/s and 20GBit/s ports, thanks Marco Poet)
Multisite:
* Improve transaction handling and reload detection: user can have
diff --git a/checks/if64 b/checks/if64
index 175d98b..a515146 100644
--- a/checks/if64
+++ b/checks/if64
@@ -24,10 +24,17 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+def fix_if64_highspeed(info):
+ for line in info:
+ if type(line[3]) == str: # not yet converted
+ line[3] = saveint(line[3]) * 1000000
+
def inventory_if64(info):
+ fix_if64_highspeed(info)
return inventory_if_common(info)
def check_if64(item, params, info):
+ fix_if64_highspeed(info)
return check_if_common(item, params, info)
check_info['if64'] = (check_if64, "Interface %s", 1, inventory_if64)
@@ -40,7 +47,7 @@ snmp_info['if64'] = \
"2.2.1.1", # ifIndex 0
"2.2.1.2", # ifDescr 1
"2.2.1.3", # ifType 2
- "2.2.1.5", # ifSpeed 3
+ "31.1.1.1.15", # ifHighSpeed .. 1000 means 1GBit
"2.2.1.8", # ifOperStatus 4
"31.1.1.1.6", # ifHCInOctets 5
"31.1.1.1.7", # ifHCInUcastPkts 6