]> granicus.if.org Git - icinga2/commitdiff
ITL: Add iftraffic64 and fix iftraffic CheckCommand plugin path
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 12 Jul 2016 10:44:34 +0000 (12:44 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 12 Jul 2016 10:46:56 +0000 (12:46 +0200)
fixes #12135

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

index 326a0e50d3feb869ae8a49a88c55e733db8312c8..2515b21a81300af6ea35fa8a0221db1f1a462f3d 100644 (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)
index 86a9aa121478184ef4473e91b77e87a6e14c116b..9dc90c7fd9f55a944dae4364659e34b0c0903c3a 100644 (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"