mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
Add 'iftraffic' to plugins-contrib check command definitions
fixes #9272
This commit is contained in:
parent
32ce4c3fae
commit
d73abd6722
@ -1500,6 +1500,24 @@ interfacetable_defaulttablesorting | **Optional.** Default table sorting can be
|
|||||||
interfacetable_tablesplit | **Optional.** Generate multiple interface tables, one per interface type. Defaults to false.
|
interfacetable_tablesplit | **Optional.** Generate multiple interface tables, one per interface type. Defaults to false.
|
||||||
interfacetable_notype | **Optional.** Remove the interface type for each interface. Defaults to false.
|
interfacetable_notype | **Optional.** Remove the interface type for each interface. Defaults to false.
|
||||||
|
|
||||||
|
### <a id="plugins-contrib-command-iftraffic"></a> iftraffic
|
||||||
|
|
||||||
|
The plugin [check_iftraffic](https://exchange.icinga.org/exchange/iftraffic)
|
||||||
|
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
|
||||||
|
------------------------|---------------------------------------------------------
|
||||||
|
iftraffic_address | **Required.** Specifies the remote host. Defaults to "$address$".
|
||||||
|
iftraffic_community | **Optional.** SNMP community. Defaults to "public'" if omitted.
|
||||||
|
iftraffic_interface | **Required.** Queried interface name.
|
||||||
|
iftraffic_bandwidth | **Required.** Interface maximum speed in kilo/mega/giga/bits per second.
|
||||||
|
iftraffic_units | **Optional.** Interface units can be one of these values: `g` (gigabits/s),`m` (megabits/s), `k` (kilobits/s),`b` (bits/s)
|
||||||
|
iftraffic_warn | **Optional.** Percent of bandwidth usage necessary to result in warning status (defaults to `85%`).
|
||||||
|
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-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.
|
||||||
|
@ -292,3 +292,50 @@ object CheckCommand "interfacetable" {
|
|||||||
vars.interfacetable_notype = false
|
vars.interfacetable_notype = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object CheckCommand "iftraffic" {
|
||||||
|
import "plugin-check-command"
|
||||||
|
command = [ PluginDir + "/check_iftraffic64.pl"]
|
||||||
|
|
||||||
|
arguments = {
|
||||||
|
"-H" = {
|
||||||
|
value = "$iftraffic_address$"
|
||||||
|
description = "Check interface on the indicated host."
|
||||||
|
required = true
|
||||||
|
}
|
||||||
|
"-C" = {
|
||||||
|
value = "$iftraffic_community$"
|
||||||
|
description = "SNMP community. Defaults to 'public' if omitted."
|
||||||
|
}
|
||||||
|
"-i" = {
|
||||||
|
value = "$iftraffic_interface$"
|
||||||
|
description = "Interface name."
|
||||||
|
required = true
|
||||||
|
}
|
||||||
|
"-b" = {
|
||||||
|
value = "$iftraffic_bandwidth$"
|
||||||
|
description = "Interface maximum speed in kilo/mega/giga/bits per second."
|
||||||
|
required = true
|
||||||
|
}
|
||||||
|
"-u" = {
|
||||||
|
value = "$iftraffic_units$"
|
||||||
|
description = "g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s."
|
||||||
|
}
|
||||||
|
"-w" = {
|
||||||
|
value = "$iftraffic_warn$"
|
||||||
|
description = "% of bandwidth usage necessary to result in warning status (default: 85%)"
|
||||||
|
}
|
||||||
|
"-c" = {
|
||||||
|
value = "$iftraffic_crit$"
|
||||||
|
description = "% of bandwidth usage necessary to result in critical status (default: 98%)"
|
||||||
|
}
|
||||||
|
"-M" = {
|
||||||
|
value = "$iftraffic_max_counter$"
|
||||||
|
description = "Max counter value of net devices in kilo/mega/giga/bytes."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vars.iftraffic_address = "$address$"
|
||||||
|
vars.iftraffic_warn = "85%"
|
||||||
|
vars.iftraffic_crit = "98%"
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user