[erlang-questions] MIB compiler errors for common MIBS

Wolf, Dave dave.wolf@REDACTED
Thu Aug 29 18:39:12 CEST 2019


Hi all,

I am working on an SNMP application that polls SNMP devices and currently it works fine if I use OIDs, but I'd like to be able to load the MIB file for the device and poll using the name associated with the OID.  The issue I am running into is that for most of my MIB files I downloaded from the manufacturer sites, the MIB compiler in Erlang encounters errors during the compile to .bin format.  I am wondering if I need to compile it in a certain directory, but I am not sure why it is failing.  Here are beginning lines of the output from an example (full errors attached in output.txt) of this command:  "erlc UPS-MIB.mib".  I have tried this on Windows and Linux hosts with the same results.

UPS-MIB.mib: 38: Macro 'TEXTUAL-CONVENTION' not imported.
UPS-MIB.mib: 45: Macro 'TEXTUAL-CONVENTION' not imported.
UPS-MIB.mib: 18: OBJECT IDENTIFIER [upsMIB] defined in terms of undefined parent object. Parent: ''mib-2''.(Sub-indexes: [33].)
UPS-MIB.mib: 52: OBJECT IDENTIFIER [upsObjects] defined in terms of undefined parent object. Parent: 'upsMIB'.(Sub-indexes: [1].)
UPS-MIB.mib: 62: OBJECT IDENTIFIER [upsIdent] defined in terms of undefined parent object. Parent: 'upsObjects'.(Sub-indexes: [1].)
UPS-MIB.mib: 64: OBJECT IDENTIFIER [upsIdentManufacturer] defined in terms of undefined parent object. Parent: 'upsIdent'.(Sub-indexes: [1].)
UPS-MIB.mib: 72: OBJECT IDENTIFIER [upsIdentModel] defined in terms of undefined parent object. Parent: 'upsIdent'.(Sub-indexes: [2].)
<<snip>>

I've attached the MIB file in case someone wants to give it a shot and tell me the errors of my ways.  I have loaded this exact MIB file into a MIB browser and it works just fine, I can browse the device without any issues.  Is there another way I can compile this MIB file?  Is it in a common format that other tools might be able to compile?

If anyone has any suggestions or needs further infomation, please let me know.

Thanks!
Dave Wolf.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190829/00d663b9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UPS-MIB.mib
Type: application/octet-stream
Size: 67040 bytes
Desc: UPS-MIB.mib
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190829/00d663b9/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output.txt
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190829/00d663b9/attachment.txt>


More information about the erlang-questions mailing list