MIB Imports failing with Import Symbol "Trap-Type" unresolved

Started by MatthewDreher, June 23, 2016, 08:00:42 PM

Previous topic - Next topic

MatthewDreher

Hello,

I'm attempting to import the MIBs associated with a c7000 blade chassis from HP.  I'm getting a large number of the above errors when trying to import their MIBs using the import tool  .  Thoughts?

tomaskir

Its sadly too common that vendors provide broken MIBs.
I would expect that is the case here as well.

I suggest you post the MIBs here, and ask Victor for help fixing them :)

MatthewDreher

so I've heard.  Here's an example one that's throwing the error.  The associated RFC appears to be 1215.  I tried using the one that came bundled, the one pre-installed with netxms, and one I found online. 


Nikk

Hi Matthew,

Did you find the solution for this? I've stumbled upon similar erro:
Quote.\RECORDER-MIB.txt" ERROR 003: Parser error - syntax error, unexpected TRAP_TYPE_SYM, expecting OBJECT_TYPE_SYM in line 350

Best regards,
Nikk

MatthewDreher

Best I can tell it that the MIBs being used aren't following strict formats and NetXMS is expecting everything to be perfect. 

Tursiops

The asmib.txt imports fine for me.
Based on the MIB file itself, TRAP-TYPE is being imported from RFC-1215.
It's possible that this one is somehow missing on your system or you might have the same MIB (maybe different file names) in your folder twice, with one of them not actually having this object defined properly - and the "wrong one" is being used. That can happen if you copy a whole range of MIBs from a vendor which happen to also include the basic ones (Cisco does that in their zipped MIB collections).

I tend to have that kind of issue after every NetXMS upgrade with the SW-MIB.mib (as I have a different MIB file from Brocade for SW-MIB, which is referenced by other Brocade MIBs).

Does
grep ^RFC-1215\ DEFINITIONS /usr/share/netxms/mibs/*.txt
return more than one result (assuming /usr/share/netxms/mibs/ is the directory holding your mibs)?


MatthewDreher

would  be tough to grep on a windows server... 

More than likely it's the HP C7000 mibs that I'm trying to import that are being problematic.  I'll have to play around with them some more, see if I can't find some better mibs out there.

Tursiops

Something like this should work under Windows if you run it inside PowerShell and in the actual directory holding the MIBs.
Otherwise you'll have to pass the full path  to Get-ChildItem instead of *.txt.

ForEach ($file in Get-ChildItem *.txt ) { Get-Content $file |Select-String -Pattern "^RFC-1215 DEFINITIONS" }