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

发布于 2024-09-03 02:45:41 字数 286 浏览 4 评论 0原文

我正在编写一个网络管理系统,并且需要能够打印出从 SNMP 陷阱接收到的 OID 后面的有意义的名称。由于该系统的性质/大小,对于正在使用的每台设备上的每个 MIB,手动将每个 OID 映射到有意义的名称并不是一个好主意。

话虽如此,是否有一种免费(商业用途)的方法可以自动将 MIB 中所有 OID 的名称/描述与其各自的 OID 配对?然后这些配对可以在 Java 程序中使用吗?

换句话说,是否有一种工具或方法可以将 MIB 树转换为可以在程序中遍历的 Java 对象以检索 OID 的名称/描述?

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

旧时光的容颜 2024-09-10 02:45:41

您需要一个 MIB 解析器 - 例如 Mibble (根据 GPL 和商业许可提供)。

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

水水月牙 2024-09-10 02:45:41

我知道线程很旧,但它可能对其他人有帮助。
可以使用 SNMP4J-SMI jar 获取 MIB 中 OIDS 的名称描述

如何使用 SNMP4J -带有 SNMP4J 的 SMI

仅供参考,它受许可证保护
商业

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

噩梦成真你也成魔 2024-09-10 02:45:41

我发现老兄很少使用 SNMP。我也从事 SNMP 方面的工作。
为此,SNMP4J 是我们可以在 java 中使用的更好的库。

http://www.snmp4j.org/

它支持 SNMP v1、v2 和 v3。

您还可以使用它来实现 Mib 树遍历,并且还可以获取特定的 OID 名称/描述和值。非常酷,使用起来也很方便,一次就进去了。

另请注意,您需要在设备管理器中提供 IP 地址,对吗?以便设备可以将 SNMP 陷阱发送到正在侦听某个端口的应用程序。

您还需要为陷阱打开端口。

希望这有帮助。如有任何疑问请告诉我。你需要更多地挖掘它。你知道网络东西是如何工作的:)。

谢谢。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文