As the title says (kind of) I have a problem with converting Cisco MIBs to a readable format for snmptt.
At the moment, I have a almost working environment with Nagios Core receiving SNMP traps, and presenting them in the web GUI. I've managed to convert some MIB-files (IF-MIB), and therefore I can see when an interface on my 3560-switch changes state to up or down.
However, I also have a Cisco PGW2200, which I would like to monitor using SNMP traps. The problem is that when I try to convert the MIB files for that product, I end up with only a few converted MIBs. I can see that my Nagios-machine receive the traps (in syslog), but without any translation happening, which means that Nagios fails to present them i the Web-GUI. What I think is that there must be more information in my unconverted MIB-files that I can extract.
The MIB files for the PGW can be found here:http://www.cisco.com/iam/PGW_MIBS/index.html
I understand that some MIB files depend on others, and that it wont work without every needed MIB file. The thing I do is that I take a MIB file, and all the MIB files stated in the IMPORT field in that certain MIB, put them in a folder (/usr/share/snmp/mibs/pgw) export that folder as MIBDIR. I then use a for loop to convert all the MIB files. In the end I just see the following message "The MIB file did not contain any TRAP-TYPE or NOTIFICATION-TYPE definitions, so no translation occurred." No other error messages is presented.
I can see in the file that there is no lines that include TRAP-TYPE or NOTIFICATION-TYPE, however, I can see that there is a lot of fields that contain OBJECT-TYPE. Isn't that a field that can be converted?Example:
If I, for a start, would like to convert the measurement.my (can be found with the link above), I read the IMPORT-part at the beginning of the file, and add the MIB files required. In the end I have the following files:
CISCO-SMI.my, CISCO-TRANSPATH-MIB.my, IANAifType-MIB.my, RFC1155-SMI.mib, RFC1158-MIB.mib, RFC1212.mib, RFC1213-MIB.my, SNMPv2-CONF.my, SNMPv2-SMI.my, SNMPv2-TC.my TPMEASUREMENT-MIB.my
I put them in /usr/share/snmp/mibs/pgw and add that folder to MIBDIRS with the following command:
# export MIBDIRS=/usr/share/snmp/mibs:/usr/share/snmp/mibs/pgw
With a for loop I go through the files and try to convert them to snmptt-format
# for i in pgw/*
> snmpttconvertmib --format_desc=6 --in=$i --out=/etc/snmp/snmptt.conf.cisco --exec='/usr/local/nagios/libexec/eventhandlers/submit_check_result $r TRAP 1' 2>>errors
This is as far as I get with the conversion. No error messages is received.