[icinga-checkins] icinga.org: icinga2/master: ITL: Add iftraffic64 and fix iftraffic CheckCommand plugin path

git at icinga.org git at icinga.org
Tue Jul 12 13:14:55 CEST 2016


Module: icinga2
Branch: master
Commit: 172b57e895bc5318d4a2f544638f63d674dbc6d3
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=172b57e895bc5318d4a2f544638f63d674dbc6d3

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Tue Jul 12 12:44:34 2016 +0200

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 326a0e5..2515b21 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.
 
+#### <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)
diff --git a/itl/plugins-contrib.d/network-components.conf b/itl/plugins-contrib.d/network-components.conf
index 86a9aa1..9dc90c7 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"



More information about the icinga-checkins mailing list