Module: check_mk
Branch: master
Commit: d69b55b0d35009e0dedaa738a157b48e9b0a514f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d69b55b0d35009…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 23 15:07:48 2015 +0100
#2154 Interface-Checks: Separate traffic thresholds for in and out are now possible
It is now possible to configure separate bandwidth thresholds for the interface
checks on the traffic directions. Instead of configuring "In/Out" at once, you
can choose only a single traffic direction to specify the levels for.
---
.werks/2154 | 11 ++
ChangeLog | 1 +
checks/if.include | 180 ++++++++++++++--------------
web/htdocs/valuespec.py | 7 +-
web/htdocs/wato.py | 4 +-
web/plugins/wato/check_mk_configuration.py | 2 +-
web/plugins/wato/check_parameters.py | 123 +++++++++++--------
web/plugins/wato/datasource_programs.py | 2 +-
8 files changed, 190 insertions(+), 140 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=d69b55b0d3…
Module: check_mk
Branch: master
Commit: 60b71e3a75fdc845adc613492ac905b71dcfdc77
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=60b71e3a75fdc8…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Mar 23 13:54:38 2015 +0100
aix_if: FIX for exception during inventory of multiple interfaces
---
checks/aix_if | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/checks/aix_if b/checks/aix_if
index db6f6ff..4f2e9bb 100644
--- a/checks/aix_if
+++ b/checks/aix_if
@@ -86,29 +86,30 @@ def parse_aix_if(info):
# speed is in Mb/s
nic_info[nic]["ifSpeed"] = int(line[3]) * 1000000
elif " ".join(line[0:2]) == "Driver Flags:":
- flags = line[2:]
+ nic_info[nic]["flags"] = line[2:]
elif len(line) and ":" not in " ".join(line) and len(flags):
- flags += line
+ nic_info[nic]["flags"] += line
- if "Up" in flags:
- nic_info[nic]["ifOperStatus"] = 1
- elif "Down" in flags:
- nic_info[nic]["ifOperStatus"] = 2
- # No information from entstat. We consider interfaces up
- # if they have been used at least some time since the
- # system boot.
- elif nic_info[nic]["ifInOctets"] > 0:
- nic_info[nic]["ifOperStatus"] = 1
- else:
- # unknown, or never been up
- nic_info[nic]["ifOperStatus"] = 4
-
- nic_info[nic]["ifOutQLen"] = 0
- nic_info[nic]["ifInDiscards"] = 0
- nic_info[nic]["ifOutDiscards"] = 0
if_table = []
for nic in nic_info:
+ if "Up" in nic_info[nic]["flags"]:
+ nic_info[nic]["ifOperStatus"] = 1
+ elif "Down" in nic_info[nic]["flags"]:
+ nic_info[nic]["ifOperStatus"] = 2
+ # No information from entstat. We consider interfaces up
+ # if they have been used at least some time since the
+ # system boot.
+ elif nic_info[nic]["ifInOctets"] > 0:
+ nic_info[nic]["ifOperStatus"] = 1
+ else:
+ # unknown, or never been up
+ nic_info[nic]["ifOperStatus"] = 4
+
+ nic_info[nic]["ifOutQLen"] = 0
+ nic_info[nic]["ifInDiscards"] = 0
+ nic_info[nic]["ifOutDiscards"] = 0
+
nic_list = []
for attr in [ "ifIndex", "ifDescr", "ifType", "ifSpeed", "ifOperStatus",
"ifInOctets", "inucast", "inmcast", "inbcast", "ifInDiscards",