From 5e3ea4720f0602605ebbcb722b2795ba456f112b Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 12 Jun 2016 13:45:56 +0200 Subject: [PATCH] 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 --- 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 1e3d47c3d2a..46ff2773a49 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. ## 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 829bd3cd3ae..fc7fd7f018c 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