Cannot find module (UPS-MIB)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Cannot find module (UPS-MIB)

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Cannot find module (UPS-MIB)

Post by abrist »

Did you restart snmptt?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Cannot find module (UPS-MIB)

Post 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.
Last edited by jbennett on Wed Jan 30, 2013 10:18 am, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Cannot find module (UPS-MIB)

Post 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
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Cannot find module (UPS-MIB)

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Cannot find module (UPS-MIB)

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Cannot find module (UPS-MIB)

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Cannot find module (UPS-MIB)

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Cannot find module (UPS-MIB)

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Cannot find module (UPS-MIB)

Post by scottwilkerson »

I totally understand, just was letting you know the use case for "Process trap:" checkbox.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked