简体   繁体   English

Java获取MIB中OID的名称/描述

[英]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. 我正在编程一个网络管理系统,并且需要能够在从SNMP陷阱接收到的OID后面打印出有意义的名称。 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. 由于系统的性质/大小,将每个OID手动映射到正在使用的每个设备上每个MIB的有意义的名称不是一个好主意。

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; 话虽如此,对于MIB中的所有OID,是否有一种免费的(商业用途)自动将名称/描述与其各自的OID配对的方法; and then those pairings be used in a Java program? 然后将这些配对用于Java程序?

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? 换句话说,是否有工具或方法将MIB树转换为可在程序中遍历以检索OID的名称/描述的Java对象?

Thanks 谢谢

I know thread is old, but it may help others. 我知道线程很旧,但是可以帮助其他人。 One can use SNMP4J-SMI jar get a name description for OIDS in MIB 可以使用SNMP4J-SMI jar获得MIB中OIDS的名称说明

How to use SNMP4J-SMI with SNMP4J 如何将SNMP4J-SMI与SNMP4J一起使用

Just fyi it comes under License Commercial 只是因为它属于商业许可

您需要一个MIB解析器-例如Mibble (在GPL和商业许可下可用)。

Very rare usage of SNMP i found dude. 我发现SNMP的使用非常罕见。 I also worked on SNMP. 我还研究过SNMP。 For that, SNMP4J is better library we can use in java. 为此, SNMP4J是我们可以在Java中使用的更好的库。

http://www.snmp4j.org/

It supports v1,v2 and v3 for SNMP. 它支持SNMP的v1,v2和v3。

Also you can implement Mib tree walking using that, and you can fetch perticular OID name/description and value also. 您也可以使用它实现Mib树遍历,还可以获取特定的OID名称/描述和值。 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? 另外请注意,您需要在设备管理器中提供IP地址吗? so that the device can send SNMP traps to your application which is listening on some port. 以便设备可以将SNMP陷阱发送到正在某个端口上侦听的应用程序。

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. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM