ITL: Add check command check_interfaces

fixes #9527

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
This commit is contained in:
Lennart Betz 2015-08-02 07:36:08 +02:00 committed by Gunnar Beutner
parent 8968dea294
commit 49cf0bb644
2 changed files with 131 additions and 0 deletions

View File

@ -1698,6 +1698,38 @@ iftraffic_warn | **Optional.** Percent of bandwidth usage necessary to result i
iftraffic_crit | **Optional.** Percent of bandwidth usage necessary to result in critical status (defaults to `98%`). iftraffic_crit | **Optional.** Percent of bandwidth usage necessary to result in critical status (defaults to `98%`).
iftraffic_max_counter | **Optional.** Maximum counter value of net devices in kilo/mega/giga/bytes. iftraffic_max_counter | **Optional.** Maximum counter value of net devices in kilo/mega/giga/bytes.
### <a id="plugins-contrib-command-interfaces"></a> interfaces
The plugin [check_interfaces](https://www.netways.org/projects/check-interfaces)
Check interfaces and utilization.
Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
Name | Description
--------------------------|---------------------------------------------------------
interfaces_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
interfaces_regex | **Optional.** Interface list regexp.
interfaces_exclude_regex | **Optional.** Interface list negative regexp.
interfaces_errors | **Optional.** Number of in errors (CRC errors for cisco) to consider a warning (default 50).
interface_out_errors | **Optional.** Number of out errors (collisions for cisco) to consider a warning (default same as in errors).
interfaces_perfdata | **Optional.** perfdata from last check result.
interfaces_prefix | **Optional.** Prefix interface names with this label.
interfaces_lastcheck | **Optional.** Last checktime (unixtime).
interfaces_bandwidth | **Optional.** Bandwidth warn level in percent.
interfaces_speed | **Optional.** Override speed detection with this value (bits per sec).
interfaces_trim | **Optional.** Cut this number of characters from the start of interface descriptions.
interfaces_mode | **Optional.** Special operating mode (default,cisco,nonbulk,bintec).
interfaces_auth_proto | **Optional.** SNMPv3 Auth Protocol (SHA|MD5)
interfaces_auth_phrase | **Optional.** SNMPv3 Auth Phrase
interfaces_priv_proto | **Optional.** SNMPv3 Privacy Protocol (AES|DES)
interfaces_priv_phrase | **Optional.** SNMPv3 Privacy Phrase
interfaces_user | **Optional.** SNMPv3 User
interfaces_down_is_ok | **Optional.** Disables critical alerts for down interfaces.
interfaces_aliases | **Optional.** Retrieves the interface description.
interfaces_match_aliases | **Optional.** Also match against aliases (Option --aliases automatically enabled).
interfaces_timeout | **Optional.** Sets the SNMP timeout (in ms).
interfaces_sleep | **Optional.** Sleep between every SNMP query (in ms).
## <a id="plugins-contrib-web"></a> Web ## <a id="plugins-contrib-web"></a> Web
This category includes all plugins for web-based checks. This category includes all plugins for web-based checks.

View File

@ -341,3 +341,102 @@ object CheckCommand "iftraffic" {
vars.iftraffic_crit = "98%" vars.iftraffic_crit = "98%"
} }
object CheckCommand "interfaces" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginContribDir + "/check_interfaces" ]
arguments = {
"--hostname" = "$interfaces_address$"
"--community" = {
value = "$interfaces_community$"
description = "The community string (default public)."
}
"--regex" = {
value = "$interfaces_regex$"
description = "Interface list regexp."
}
"--exclude-regex" = {
value = "$interfaces_exclude_regex$"
description = "Interface list negative regexp."
}
"--errors" = {
value = "$interfaces_errors$"
description = "Number of in errors (CRC errors for cisco) to consider a warning (default 50)."
}
"--out-errors" = {
value = "$interface_out_errors$"
description = "Number of out errors (collisions for cisco) to consider a warning (default same as in errors)."
}
"--perfdata" = {
value = "$interfaces_perfdata$"
}
"--prefix" = {
value = "$interfaces_prefix$"
description = "Prefix interface names with this label."
}
"--lastcheck" = {
value = "$interfaces_lastcheck$"
description = "Last checktime (unixtime)."
}
"--bandwidth" = {
value = "$interfaces_bandwidth$"
description = "Bandwidth warn level in percent."
}
"--speed" = {
value = "$interfaces_speed$"
description = "Override speed detection with this value (bits per sec)."
}
"--trim" = {
value = "$interfaces_trim$"
description = "Cut this number of characters from the start of interface descriptions."
}
"--mode" = {
value = "$interfaces_mode$"
description = "Special operating mode (default,cisco,nonbulk,bintec)."
}
"--auth-proto" = {
value = "$interfaces_auth_proto$"
description = "SNMPv3 Auth Protocol (SHA|MD5)"
}
"--auth-phrase" = {
value = "$interfaces_auth_phrase$"
description = "SNMPv3 Auth Phrase"
}
"--priv-proto" = {
value = "$interfaces_priv_proto$"
description = "SNMPv3 Privacy Protocol (AES|DES)"
}
"--priv-phrase" = {
value = "$interfaces_priv_phrase$"
description = "SNMPv3 Privacy Phrase"
}
"--user" = {
value = "$interfaces_user$"
description = "SNMPv3 User"
}
"--down-is-ok" = {
set_if = "$interfaces_down_is_ok$"
description = "Disables critical alerts for down interfaces."
}
"--aliases" = {
set_if = "$interfaces_aliases$"
description = "Retrieves the interface description."
}
"--match-aliases" = {
value = "$interfaces_match_aliases$"
description = "Also match against aliases (Option --aliases automatically enabled)."
}
"--timeout" = {
value = "$interfaces_timeout$"
description = "Sets the SNMP timeout (in ms)."
}
"--sleep" = {
value = "$interfaces_sleep$"
description = "Sleep between every SNMP query (in ms)."
}
}
vars.interfaces_address = "$check_address$"
}