SNMP-如何创建MIB文件?

时间:2016-04-21 10:56:36

标签: snmp

我是SNMP新手,我已阅读http://techdive.in/并能够理解一些事情,但我想创建自己的MIB文件,这个文件应该被送到MIB浏览器,有没有办法实现这个? http://techdive.in/snmp/snmp4j-trap-sender中的SNMP Track发送器java代码与MIB浏览器有什么关系?有什么帮助吗?

1 个答案:

答案 0 :(得分:2)

If you just want to create a MIB, you can do it w/just a text editor and verify w/a ASN.1 compiler such as snacc (there are many others, building a ASN.1 compiler was a popular graduate school project back when SNMP was popular).

It is a different question if you want the MIB to play nice w/a SNMP agent. The answer depends upon which agent you select. Honestly, you do not need a MIB to instrument an agent - the MIB exists to document the instrumentation and the agent may (or may not) even reference it.

I looked at the snmp4j-trap-sender and it is a small example for using the snmp4j API to generate a SNMP trap. A trap payload can be specified using ASN.1 (trap payloads usually quite small, perhaps just an OID and a time stamp).

You might consider looking at http://www.net-snmp.org/ since this is a very popular (and mature) implementation w/a lot of documentation and examples.

Good luck.