From 172b57e895bc5318d4a2f544638f63d674dbc6d3 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 12 Jul 2016 12:44:34 +0200 Subject: [PATCH] ITL: Add iftraffic64 and fix iftraffic CheckCommand plugin path fixes #12135 --- doc/7-icinga-template-library.md | 18 +++++++ itl/plugins-contrib.d/network-components.conf | 51 ++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 326a0e50d..2515b21a8 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -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. +#### 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. + #### interfaces The plugin [check_interfaces](https://www.netways.org/projects/check-interfaces) diff --git a/itl/plugins-contrib.d/network-components.conf b/itl/plugins-contrib.d/network-components.conf index 86a9aa121..9dc90c7fd 100644 --- a/itl/plugins-contrib.d/network-components.conf +++ b/itl/plugins-contrib.d/network-components.conf @@ -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" -- 2.49.0