Module: check_mk
Branch: master
Commit: 923a03c8eed0f30bab7357622fa97bbb580926a2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=923a03c8eed0f3…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Jan 26 15:28:47 2015 +0100
bonding.include: Support for speed output
---
checks/bonding.include | 4 +++-
checks/windows_os_bonding | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/checks/bonding.include b/checks/bonding.include
index e84a844..b1fa42d 100644
--- a/checks/bonding.include
+++ b/checks/bonding.include
@@ -44,9 +44,11 @@ def check_bonding(item, params, parsed):
status = parsed[item]
if status["status"] not in ("up", "degraded"):
return 2, "interface is " + status["status"]
-
infos = [ "mode: " + status["mode"] ]
state = 0
+ speed = status.get('speed')
+ if speed:
+ infos.append("Speed:" + speed)
for eth, slave in status["interfaces"].items():
if "hwaddr" in slave:
infos.append("%s/%s %s" % (eth, slave["hwaddr"],
slave["status"]))
diff --git a/checks/windows_os_bonding b/checks/windows_os_bonding
index 07f6130..f20baf1 100644
--- a/checks/windows_os_bonding
+++ b/checks/windows_os_bonding
@@ -58,6 +58,8 @@ def parse_windows_os_bonding(info):
bonds[bond]["mode"] = line[1]
elif line[0] == "Status":
bonds[bond]["status"] = line[1].lower()
+ elif line[0] == "Speed":
+ bonds[bond]["speed"] = line[1]
elif line[0] == "Slave Name":
slave = line[1]
bonds[bond]["interfaces"][slave] = {}