English 中文(简体)
Java Getting Name/Description for OIDs in MIB
原标题:

I am programming a network management system, and need to be able to print out meaningful names behind the OIDs that are received from SNMP traps. Due to the nature/size of this system, it would not be a good idea to manually map every OID to a meaningful name for every MIB on every device that is being used.

With that said, is there a free (commercial use) way of automatically pairing name/description with their respective OID for all OIDs in a MIB; and then those pairings be used in a Java program?

In other words, is there a tool or method that will convert a MIB tree to Java objects that can be traversed in a program to retrieve OID s names/descriptions?

Thanks

最佳回答

You need a MIB parser - for example Mibble (available under GPL and commercial license).

问题回答

I know thread is old, but it may help others. One can use SNMP4J-SMI jar get a name description for OIDS in MIB

How to use SNMP4J-SMI with SNMP4J

Just fyi it comes under License Commercial

Very rare usage of SNMP i found dude. I also worked on SNMP. For that, SNMP4J is better library we can use in java.

http://www.snmp4j.org/

It supports v1,v2 and v3 for SNMP.

Also you can implement Mib tree walking using that, and you can fetch perticular OID name/description and value also. Its very cool and easy to use once to get into it.

Also note, that you need to provide the IP address in the device manager right? so that the device can send SNMP traps to your application which is listening on some port.

You need to open the port also for traps.

hope this helps. let me know if any queries. You need to dig more into it. You know how networking stuff works :).

thanks.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签