]> granicus.if.org Git - icinga2/commitdiff
Add 'iftraffic' to plugins-contrib check command definitions
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 13 May 2015 12:13:45 +0000 (14:13 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 13 May 2015 12:58:03 +0000 (14:58 +0200)
fixes #9272

doc/7-icinga-template-library.md
itl/plugins-contrib.d/network-components.conf

index 19399a110c9efd2d77d8b609c97a6ea9bdc29e07..80e9d728ded60f44b429dea03027966abf0bb375 100644 (file)
@@ -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_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
 
 This category includes all plugins for web-based checks.
index 2fba3162d0ae6fae07c68be82ce4c67f9d1476cd..8345dcbb4fe27682a19b1a6e16dc99244a9889ec 100644 (file)
@@ -292,3 +292,50 @@ object CheckCommand "interfacetable" {
        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%"
+}
+