[icinga-checkins] icinga.org: icinga2/master: ITL: Add option for ifName to Manubulon CheckCommand 'snmp_interface'

git at icinga.org git at icinga.org
Wed Jun 15 18:03:06 CEST 2016

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

Author: Jan Wagner <waja at cyconet.org>
Date:   Sun Jun 12 13:45:56 2016 +0200

ITL: Add option for ifName to Manubulon CheckCommand 'snmp_interface'

Recent Net-SNMP's snmpd daemon has changed behavior returning detailed
information about the network interfaces in the IF-MIB::ifDescr MIB.

There is a patch out there that is working around the issue (see also
https://bugs.debian.org/812837) by providing the behaviour via '-N'.

This path provides a way to make use of this workaround.

fixes #11931

Signed-off-by: Michael Friedrich <michael.friedrich at netways.de>


 doc/7-icinga-template-library.md   |    6 +++++-
 itl/command-plugins-manubulon.conf |    4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md
index 1e3d47c..46ff277 100644
--- a/doc/7-icinga-template-library.md
+++ b/doc/7-icinga-template-library.md
@@ -1456,9 +1456,12 @@ This command has the same custom attributes like the `nscp-local` check command.
 ## <a id="snmp-manubulon-plugin-check-commands"></a> Plugin Check Commands for Manubulon SNMP
-The `SNMP Manubulon Plugin Check Commands` provide example configuration for plugin check
+The `SNMP Manubulon Plugin Check Commands` provide configuration for plugin check
 commands provided by the [SNMP Manubulon project](http://nagios.manubulon.com/index_snmp.html).
+**Note:** Some plugin parameters are only available in Debian packages or in a
+[forked repository](https://github.com/dnsmichi/manubulon-snmp) with patches applied.
 The SNMP manubulon plugin check commands assume that the global constant named `ManubulonPluginDir`
 is set to the path where the Manubublon SNMP plugins are installed.
@@ -1604,6 +1607,7 @@ snmp_interface_errors       | **Optional.** Add error & discard to Perfparse out
 snmp_interface_noregexp     | **Optional.** Do not use regexp to match interface name in description OID. Defaults to false.
 snmp_interface_delta        | **Optional.** Delta time of perfcheck. Defaults to "300" (5 min).
 snmp_warncrit_percent       | **Optional.** Make the warning and critical levels in % of reported interface speed. If set, **snmp_interface_megabytes** needs to be set to false. Defaults to false.
+snmp_interface_ifname       | **Optional.** Switch from IF-MIB::ifDescr to IF-MIB::ifName when looking up the interface's name
 snmp_perf                   | **Optional.** Enable perfdata values. Defaults to true.
 snmp_timeout                | **Optional.** The command timeout in seconds. Defaults to 5 seconds.
diff --git a/itl/command-plugins-manubulon.conf b/itl/command-plugins-manubulon.conf
index 829bd3c..fc7fd7f 100644
--- a/itl/command-plugins-manubulon.conf
+++ b/itl/command-plugins-manubulon.conf
@@ -187,6 +187,9 @@ object CheckCommand "snmp-interface" {
 		"-u" = {
 			set_if = "$snmp_interface_warncrit_percent$"
+		"-N" = {
+			set_if = "$snmp_interface_ifname$"
+		}
 		"-f" = {
 			set_if = "$snmp_perf$"
@@ -203,6 +206,7 @@ object CheckCommand "snmp-interface" {
 	vars.snmp_interface_noregexp = false
 	vars.snmp_interface_delta = 300
 	vars.snmp_interface_warncrit_percent = false
+	vars.snmp_interface_ifname = false
 	vars.snmp_warn = "300,400"
 	vars.snmp_crit = "0,600"
 	vars.snmp_perf = true

More information about the icinga-checkins mailing list