Processed SNMP MIB's missing EXEC lines

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
eclypse
Posts: 50
Joined: Thu Dec 01, 2011 4:55 pm

Processed SNMP MIB's missing EXEC lines

Post 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?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Processed SNMP MIB's missing EXEC lines

Post by sreinhardt »

What version of XI are you on, and what route are you taking to add mibs and convert them?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
eclypse
Posts: 50
Joined: Thu Dec 01, 2011 4:55 pm

Re: Processed SNMP MIB's missing EXEC lines

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Processed SNMP MIB's missing EXEC lines

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked