Page 1 of 1

Processed SNMP MIB's missing EXEC lines

Posted: Mon Mar 24, 2014 12:54 pm
by eclypse
I noticed that when I attempt to add new MIB's into my Nagios system, the processed mibs do not contain the proper EXEC lines, and therefore, never create notifications as they should.

For example, this is a properly configured stanza in snmptt.conf:

Code: Select all

EVENT drivePredictiveFailure .1.3.6.1.4.1.3183.1.1.0.880386 "Status Events" Normal
FORMAT Drive Predictive Failure event. $*
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "Drive Predictive Failure event. $*"
SDESC
Drive Predictive Failure event.
Variables:
EDESC
And here is what gets generated if I use the MIB uploader and select "Process trap":

Code: Select all

EVENT drivePredictiveFailure .1.3.6.1.4.1.3183.1.1.0.880386 "Status Events" WARNING
FORMAT Drive Predictive Failure event. $*
SDESC
Drive Predictive Failure event.
Variables:
EDESC
When I run snmptt in debug mode, I see the following errors when the trap comes in, resulting in no notification being sent.
EXEC line(s):
EXEC line not defined

Am I doing something wrong, or is there a bug in my version of my MIB uploader utility?

Re: Processed SNMP MIB's missing EXEC lines

Posted: Mon Mar 24, 2014 4:38 pm
by sreinhardt
What version of XI are you on, and what route are you taking to add mibs and convert them?

Re: Processed SNMP MIB's missing EXEC lines

Posted: Tue Apr 01, 2014 9:18 am
by eclypse
I'm on Nagios XI version 2012R1.5. /usr/local/nagiosxi/html/admin/mibs.php is dated: mibs.php 451 2011-01-13 18:04:47Z egalstad

To add MIB's, I navigate to System Extensions > Manage MIBS (http://[mynagiosserver]/nagiosxi/admin/mibs.php). I then select a MIB file for upload, select the "Process trap" checkbox, and then "Upload MIB".

This then places the processed MIB into /usr/share/snmp/mibs/processed_mibs, and updates /etc/snmp/snmptt.ini with the path to that file. Problem is that the EXEC lines are missing in these files, resulting in no notifications being generated when the trap is receive.

However, if I instead run "/usr/local/bin/addmib" from the command line, the MIB is processed, and lines are appended to /etc/snmp/snmptt.conf.

Re: Processed SNMP MIB's missing EXEC lines

Posted: Tue Apr 01, 2014 1:32 pm
by sreinhardt
Ah, yes this was an issue up until 2.8, as it was patched in mid January. You are correct that it should be running the addmib command, however up until the patch was running snmpconvertmib or something along those lines. The only way to resolve this so that the web interface works properly is to update to 2012R2.8 or newer, honestly if you are going to do it, I would suggest going straight to 2.9.