Page 1 of 1
Cannot find module (UPS-MIB)
Posted: Tue Jan 29, 2013 4:26 pm
by jbennett
I am in the process of adding in mib files and have run into a snag.
I have configured snmp using # snmpconf -r none -g basic_setup
I have then followed the Integrating SNMP Traps document and installed the .rpm file that is suggested.
I have uploaded two MIB files via the Nagios web interface: TRIPPLITE-MIB.txt and USHAP.mib
Then, when I attempted to import each of the 2 new MIBs using the addmib file, I get the following (from within the /usr/share/snmp/mibs/directory)
Code: Select all
# addmib TRIPPLITE-MIB.txt
No log handling enabled - turning on stderr logging
Cannot find module (UPS-MIB): At line 27 in ./TRIPPLITE-MIB.txt
Did not find 'PositiveInteger' in module #-1 (./TRIPPLITE-MIB.txt)
Did not find 'NonNegativeInteger' in module #-1 (./TRIPPLITE-MIB.txt)
and
Code: Select all
# addmib USHAP.MIB
No log handling enabled - turning on stderr logging
Cannot find module (UPS-MIB): At line 75 in ./USHAP.MIB
Did not find 'PositiveInteger' in module #-1 (./USHAP.MIB)
Did not find 'NonNegativeInteger' in module #-1 (./USHAP.MIB)
I'm assuming that this means I'm missing the UPS-MIB module, but I'm not sure where I need to go from here.
EDIT: Upon searching a bit further, I saw where RFC1628.MIB is necessary (?). I figured I would give it a go and add it via the web interface, with the following result:
Code: Select all
Failed to convert all mibs in uploaded file.
Total translations: 5
Successful translations: 4
Failed translations: 1
I then went and tried addmib RFC1628.MIB and was thrown the following error:
Code: Select all
Unknown object identifier: UPS-MIB::IMPORTS
I then tried to run addmib again on USHAP.MIB and TRIPPLITE-MIB.txt, which both appear to have completed successfully.
Is this a step that I missed in the documentation or a pre-req? Should I be concerned about the unknown object identifier error?
Re: Cannot find module (UPS-MIB)
Posted: Tue Jan 29, 2013 5:11 pm
by abrist
Did you restart snmptt?
Re: Cannot find module (UPS-MIB)
Posted: Wed Jan 30, 2013 9:40 am
by jbennett
abrist wrote:Did you restart snmptt?
I'm not sure I follow. I don't see the connection at this point?
Restarting snmptt would be a final step, but it doesn't tell me if the messages I'm seeing are something I need to be concerned with?
I did go ahead and attempt to restart snmptt )service snmptt restart) and I'm getting the following error:
Code: Select all
Could not open configuration file: /usr/share/snmp/mibs/processed_mibs/.txt (No such file or directory) at /usr/local/sbin/snmptt line 2733.
Line 2733:
Code: Select all
warn "Could not open configuration file: $snmpttconffile ($!)";
if ($DEBUGGING >= 1)
Looking at snmptt.ini, I see the following:
Code: Select all
[TrapFiles]
# A list of snmptt.conf files (this is NOT the snmptrapd.conf file). The COMPLETE path
# and filename. Ex: '/etc/snmp/snmptt.conf'
snmptt_conf_files = <<END
/usr/share/snmp/mibs/processed_mibs/.txt
/etc/snmp/snmptt.conf
Looking in /usr/share/snmp/mibs/processed_mibs, I have 0 files.
I have already gone through the snmptt.conf file and edited statues from Normal to Warning and Critical as necessary.
Re: Cannot find module (UPS-MIB)
Posted: Wed Jan 30, 2013 10:06 am
by scottwilkerson
jbennett wrote:abrist wrote:Did you restart snmptt?
I'm not sure I follow. I don't see the connection to directing me to restart snmptt to answering the questions at hand?
Restarting snmptt would be a final step, but it doesn't tell me if the messages I'm seeing are something I need to be concerned with?
Actually, you are correct this shouldn't matter for the errors but will matter for the new trap MIBS to take effect. The errors are likely because of the missing UPS-MIB.
I have downloaded what I believe to be the correct MIB and attached it to this post, you will need to unzip before installing
Re: Cannot find module (UPS-MIB)
Posted: Wed Jan 30, 2013 11:13 am
by jbennett
Upon uploading via the web interface:
Code: Select all
Failed to convert all mibs in uploaded file.
Total translations: 4
Successful translations: 0
Failed translations: 4
And I'm sorry if that previous post came across snotty, it was not intended as such.
I went ahead and tried to addmib for the UPS-MIB.mib once more and I ended up with quite a few errors for each of the OIDs: Cannot adopt OID in UPS-MIB:
I then tried addmib TRIPPLITE-MIB.txt, only to end up with the same general errors as before:
Code: Select all
No log handling enabled - turning on stderr logging
Unlinked OID in UPS-MIB: upsMIB ::= { mib-2 33 }
Undefined identifier: mib-2 near line 17 of /usr/share/snmp/mibs/UPS-MIB.mib
I took to Google and found the following:
https://www.zabbix.com/forum/showthread.php?p=81994
Thus, I edited the UPS-MIB.mib file as suggested, then tried addmib once more and it appears to have gone through fine.
Though, now I suppose that I need ot go back and re-edit the snmptt.conf file again and remove duplicates.
However, I'm still left wondering about the initial errors upon trying to upload the UPS-MIB.mib file via the nagios interface. Do I need to be concerned with this?
Re: Cannot find module (UPS-MIB)
Posted: Wed Jan 30, 2013 11:57 am
by scottwilkerson
It likely didn't go through when uploading through the web interface because of the same errors.
When you choose to process a mib through the web interface, if there are any errors at all it will reject it.
It will not do this if you are just uploading the mib and not checking the process mib checkbox.
Re: Cannot find module (UPS-MIB)
Posted: Wed Jan 30, 2013 12:08 pm
by jbennett
scottwilkerson wrote:When you choose to process a mib through the web interface, if there are any errors at all it will reject it.
Is checking the box to process it essentially doing the same thing as running addmib from the command line?
Re: Cannot find module (UPS-MIB)
Posted: Wed Jan 30, 2013 12:26 pm
by scottwilkerson
jbennett wrote:
Is checking the box to process it essentially doing the same thing as running addmib from the command line?
No. This should be documented better, both handle running snmpttconvertmib against the MIB but only the addmib command actually adds handling to send the result to Nagios.
Others use the snmptt when using
NSTI and do not want traps sent directly to nagios as an object
Re: Cannot find module (UPS-MIB)
Posted: Wed Jan 30, 2013 3:59 pm
by jbennett
I am not sure that NSTI fits out needs, other than to maybe filter the traps that are being sent to make configuring states easier?
Re: Cannot find module (UPS-MIB)
Posted: Wed Jan 30, 2013 5:28 pm
by scottwilkerson
I totally understand, just was letting you know the use case for "Process trap:" checkbox.