Module: check_mk
Branch: master
Commit: 9ded52ec6cc3f7e747533830bee6a8fcba265a4a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ded52ec6cc3f7…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Jun 8 10:57:05 2017 +0200
4634 FIX aix_if: Make check work with different ifconfig output format
On some systems, the operational status information is listed under
"KIM Driver Flags" instead of simply "Driver Flags", which previously
could not be parsed correctly by the check. This has been fixed.
Change-Id: I474b58f9df8496cb271578049b8e3b9e1f05324d
---
.werks/4634 | 13 +++++++++++++
checks/aix_if | 2 ++
2 files changed, 15 insertions(+)
diff --git a/.werks/4634 b/.werks/4634
new file mode 100644
index 0000000..0a587e0
--- /dev/null
+++ b/.werks/4634
@@ -0,0 +1,13 @@
+Title: aix_if: Make check work with different ifconfig output format
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1496911872
+
+On some systems, the operational status information is listed under
+"KIM Driver Flags" instead of simply "Driver Flags", which
previously
+could not be parsed correctly by the check. This has been fixed.
diff --git a/checks/aix_if b/checks/aix_if
index 9f305af..6b3de09 100644
--- a/checks/aix_if
+++ b/checks/aix_if
@@ -85,6 +85,8 @@ 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 " ".join(line[0:3]) == "KIM Driver Flags:":
+ nic_info[nic]["flags"] = line[3:]
elif len(line) and ":" not in " ".join(line) and
"flags" in nic_info[nic]:
nic_info[nic]["flags"] += line