Module: check_mk
Branch: master
Commit: f1b87fb238b7d25ad197f182a50e487754b78d43
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f1b87fb238b7d2…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Mar 23 14:13:59 2015 +0100
aix_if: some more fixes
---
checks/aix_if | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/checks/aix_if b/checks/aix_if
index 4f2e9bb..c4f66c7 100644
--- a/checks/aix_if
+++ b/checks/aix_if
@@ -44,13 +44,11 @@
# Simplex 64BitSupport ChecksumOffload
# DataRateSet
-check_includes['aix_if'] = [ "if.include" ]
def parse_aix_if(info):
nic_info = {}
current_nic = None
index = 0
- flags = ()
for line in info:
# Be careful! On clustered hosts we have more than one perf-counters section
# and ethtool section. This needs to be handled. Sadly we have no section
@@ -87,10 +85,9 @@ def parse_aix_if(info):
nic_info[nic]["ifSpeed"] = int(line[3]) * 1000000
elif " ".join(line[0:2]) == "Driver Flags:":
nic_info[nic]["flags"] = line[2:]
- elif len(line) and ":" not in " ".join(line) and len(flags):
+ elif len(line) and ":" not in " ".join(line) and
"flags" in nic_info[nic]:
nic_info[nic]["flags"] += line
-
if_table = []
for nic in nic_info:
if "Up" in nic_info[nic]["flags"]:
@@ -119,9 +116,11 @@ def parse_aix_if(info):
if_table.append(map(str, nic_list))
return if_table
+
def inventory_aix_if(info):
return inventory_if_common(info)
+
def check_aix_if(item, params, info):
return check_if_common(item, params, info)