I am new to SNMP, I have read http://techdive.in/ and able to understand few things, But I want to create MIB file of my own, and this file should be fed to MIB browser, Is there any way to achieve this? How is SNMP Track sender java code in http://techdive.in/snmp/snmp4j-trap-sender is related to MIB browser? Any help?
1 Answers
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.