]> granicus.if.org Git - icinga2/commitdiff
ITL: Add option for ifName to Manubulon CheckCommand 'snmp_interface'
authorJan Wagner <waja@cyconet.org>
Sun, 12 Jun 2016 11:45:56 +0000 (13:45 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 15 Jun 2016 16:02:36 +0000 (18:02 +0200)
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@netways.de>
doc/7-icinga-template-library.md
itl/command-plugins-manubulon.conf

index 1e3d47c3d2a17cd6bcf3411d6264c76c87957f54..46ff2773a49ae77c947c91feee5410a0d4e3618e 100644 (file)
@@ -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.
 
index 829bd3cd3ae83231af11006cb7bce0e088193cc5..fc7fd7f018c2b27f81705bb8cf85d3d8c62ec7fa 100644 (file)
@@ -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