ITL: Add iftraffic64 and fix iftraffic CheckCommand plugin path

fixes #12135
This commit is contained in:
Michael Friedrich 2016-07-12 12:44:34 +02:00
parent ea57f0045e
commit 172b57e895
2 changed files with 68 additions and 1 deletions

View File

@ -2040,6 +2040,24 @@ 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_max_counter | **Optional.** Maximum counter value of net devices in kilo/mega/giga/bytes.
#### <a id="plugins-contrib-command-iftraffic64"></a> iftraffic64
The plugin [check_iftraffic64](https://exchange.icinga.org/exchange/iftraffic64)
checks the utilization of a given interface name using the SNMP protocol.
Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
Name | Description
------------------------|---------------------------------------------------------
iftraffic64_address | **Required.** Specifies the remote host. Defaults to "$address$".
iftraffic64_community | **Optional.** SNMP community. Defaults to "public'" if omitted.
iftraffic64_interface | **Required.** Queried interface name.
iftraffic64_bandwidth | **Required.** Interface maximum speed in kilo/mega/giga/bits per second.
iftraffic64_units | **Optional.** Interface units can be one of these values: `g` (gigabits/s),`m` (megabits/s), `k` (kilobits/s),`b` (bits/s)
iftraffic64_warn | **Optional.** Percent of bandwidth usage necessary to result in warning status (defaults to `85`).
iftraffic64_crit | **Optional.** Percent of bandwidth usage necessary to result in critical status (defaults to `98`).
iftraffic64_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)

View File

@ -296,7 +296,7 @@ object CheckCommand "iftraffic" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginContribDir + "/check_iftraffic64.pl"]
command = [ PluginContribDir + "/check_iftraffic.pl"]
arguments = {
"-H" = {
@ -341,6 +341,55 @@ object CheckCommand "iftraffic" {
vars.iftraffic_crit = "98%"
}
object CheckCommand "iftraffic64" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginContribDir + "/check_iftraffic64.pl"]
arguments = {
"-H" = {
value = "$iftraffic64_address$"
description = "Check interface on the indicated host."
required = true
}
"-C" = {
value = "$iftraffic64_community$"
description = "SNMP community. Defaults to 'public' if omitted."
}
"-i" = {
value = "$iftraffic64_interface$"
description = "Interface name."
required = true
}
"-b" = {
value = "$iftraffic64_bandwidth$"
description = "Interface maximum speed in kilo/mega/giga/bits per second."
required = true
}
"-u" = {
value = "$iftraffic64_units$"
description = "g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s."
}
"-w" = {
value = "$iftraffic64_warn$"
description = "% of bandwidth usage necessary to result in warning status (default: 85%)"
}
"-c" = {
value = "$iftraffic64_crit$"
description = "% of bandwidth usage necessary to result in critical status (default: 98%)"
}
"-M" = {
value = "$iftraffic64_max_counter$"
description = "Max counter value of net devices in kilo/mega/giga/bytes."
}
}
vars.iftraffic64_address = "$check_address$"
vars.iftraffic64_warn = "85"
vars.iftraffic64_crit = "98"
}
object CheckCommand "interfaces" {
import "plugin-check-command"
import "ipv4-or-ipv6"