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@netways.de>
This commit is contained in:
Jan Wagner 2016-06-12 13:45:56 +02:00 committed by Michael Friedrich
parent 2b474823f8
commit 5e3ea4720f
2 changed files with 9 additions and 1 deletions

View 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.

View 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