NetXMS Support Forum

English Support => General Support => Topic started by: MatthewDreher on June 23, 2016, 08:00:42 PM

Title: MIB Imports failing with Import Symbol "Trap-Type" unresolved
Post by: MatthewDreher on June 23, 2016, 08:00:42 PM
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?
Title: Re: MIB Imports failing with Import Symbol "Trap-Type" unresolved
Post by: tomaskir on June 23, 2016, 08:25:43 PM
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 :)
Title: Re: MIB Imports failing with Import Symbol "Trap-Type" unresolved
Post by: MatthewDreher on June 23, 2016, 09:00:59 PM
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. 

Title: Re: MIB Imports failing with Import Symbol "Trap-Type" unresolved
Post by: Nikk on July 28, 2016, 03:06:31 PM
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
Title: Re: MIB Imports failing with Import Symbol "Trap-Type" unresolved
Post by: MatthewDreher on July 28, 2016, 08:49:51 PM
Best I can tell it that the MIBs being used aren't following strict formats and NetXMS is expecting everything to be perfect. 
Title: Re: MIB Imports failing with Import Symbol "Trap-Type" unresolved
Post by: Tursiops on July 29, 2016, 01:56:27 AM
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)?

Title: Re: MIB Imports failing with Import Symbol "Trap-Type" unresolved
Post by: MatthewDreher on July 29, 2016, 04:11:19 PM
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.
Title: Re: MIB Imports failing with Import Symbol "Trap-Type" unresolved
Post by: Tursiops on August 02, 2016, 03:04:37 AM
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" }