[icinga-checkins] icinga.org: icinga2/feature/add-label-snmp-check-7545: Add label option to snmp ckecks

git at icinga.org git at icinga.org
Wed Nov 26 19:15:08 CET 2014


Module: icinga2
Branch: feature/add-label-snmp-check-7545
Commit: 2e94bb68f364ad6def73f6b8052e025a6fb9ca8b
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=2e94bb68f364ad6def73f6b8052e025a6fb9ca8b

Author: Carlos Cesario <carloscesario at gmail.com>
Date:   Wed Nov 26 16:08:26 2014 -0200

Add label option to snmp ckecks

Add label option to snmpv3 and snmp snmp-interface commands. Based on attached files to ticket #7545.

refs #7545

---

 doc/7-configuring-icinga-2.md      |    2 ++
 itl/command-plugins-manubulon.conf |    2 ++
 itl/command-plugins.conf           |    1 +
 3 files changed, 5 insertions(+)

diff --git a/doc/7-configuring-icinga-2.md b/doc/7-configuring-icinga-2.md
index 12b1427..a0f232a 100644
--- a/doc/7-configuring-icinga-2.md
+++ b/doc/7-configuring-icinga-2.md
@@ -2309,6 +2309,7 @@ snmpv3_priv_key   | **Required.** The encryption key.
 snmpv3_oid        | **Required.** The SNMP OID.
 snmpv3_warn       | **Optional.** The warning threshold.
 snmpv3_crit       | **Optional.** The critical threshold.
+snmpv3_label      | **Optional.** Prefix label for output value.
 
 #### <a id="plugin-check-command-snmp-uptime"></a> snmp-uptime
 
@@ -2576,6 +2577,7 @@ snmp_warn                   | **Optional.** The warning threshold.
 snmp_crit                   | **Optional.** The critical threshold.
 snmp_interface              | **Optional.** Network interface name. Default to regex "eth0".
 snmp_interface_perf         | **Optional.** Check the input/ouput bandwidth of the interface. Defaults to "true".
+snmp_interface_label        | **Optional.** Add label before speed in output: in=, out=, errors-out=, etc... Defaults to "false".
 snmp_interface_bits_bytes   | **Optional.** Output performance data in bits/s or Bytes/s. **Depends** on snmp_interface_kbits set to "true". Defaults to "true".
 snmp_interface_percent      | **Optional.** Output performance data in % of max speed. Defaults to "false".
 snmp_interface_kbits        | **Optional.** Make the warning and critical levels in KBits/s. Defaults to "true".
diff --git a/itl/command-plugins-manubulon.conf b/itl/command-plugins-manubulon.conf
index d9c187d..0ebf5d8 100644
--- a/itl/command-plugins-manubulon.conf
+++ b/itl/command-plugins-manubulon.conf
@@ -153,6 +153,7 @@ object CheckCommand "snmp-interface" {
 		"-k" = {
 			set_if = "$snmp_interface_perf$"
 		}
+		"--label" = set_if = "$snmp_interface_label$"
 		"-Y" = {
 			set_if = "$snmp_interface_bits_bytes$"
 		}
@@ -185,6 +186,7 @@ object CheckCommand "snmp-interface" {
 
 	vars.snmp_interface = "eth0"
 	vars.snmp_interface_perf = true
+	vars.snmp_interface_label = false
 	vars.snmp_interface_bits_bytes = true
 	vars.snmp_interface_percent = false
 	vars.snmp_interface_kbits = true
diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf
index c7acbfd..7da0f64 100644
--- a/itl/command-plugins.conf
+++ b/itl/command-plugins.conf
@@ -588,6 +588,7 @@ object CheckCommand "snmpv3" {
 		"-o" = "$snmpv3_oid$"
 		"-c" = "$snmpv3_crit$"
 		"-w" = "$snmpv3_warn$"
+		"-l" = "$snmpv3_label$"
 	}
 
 	vars.snmpv3_address = "$address$"



More information about the icinga-checkins mailing list