[icinga-checkins] icinga.org: icinga2/feature/parse-files-in-parallel-7822: Add label option to snmp ckecks

git at icinga.org git at icinga.org
Thu Nov 27 16:29:39 CET 2014


Module: icinga2
Branch: feature/parse-files-in-parallel-7822
Commit: 443ae0f298317140e77bf24fb563faa395226a9c
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=443ae0f298317140e77bf24fb563faa395226a9c

Author: Carlos Cesario <carloscesario at gmail.com>
Date:   Wed Nov 26 16:45:40 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.

fixes #7545

Signed-off-by: Gunnar Beutner <gunnar.beutner at netways.de>

---

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

diff --git a/doc/7-configuring-icinga-2.md b/doc/7-configuring-icinga-2.md
index 12b1427..0e48192 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...
 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..58cba07 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" = "$snmp_interface_label$"
 		"-Y" = {
 			set_if = "$snmp_interface_bits_bytes$"
 		}
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