Module: check_mk
Branch: master
Commit: 3b9039829cda9fd0666889b7ae076d0949607e36
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3b9039829cda9f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Feb 20 10:55:51 2012 +0100
Fixed small bug when ethtool is not present
---
checks/lnx_if | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/checks/lnx_if b/checks/lnx_if
index 8940bdc..7b88367 100644
--- a/checks/lnx_if
+++ b/checks/lnx_if
@@ -68,10 +68,11 @@ def if_lnx_convert_to_if64(info):
# in that case.
if_table = []
+ index = 0
for nic, attr in nic_info.items():
counters = attr.get("counters", [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])
-
- ifIndex = attr["index"]
+ index += 1
+ ifIndex = attr.get("index",index)
ifDescr = nic
ifAlias = nic