Getting Started with the Java Dynamic Management Kit 4.1

The SNMP Toolkit

The Java Dynamic Management Kit 4.1 provides a toolkit for developing SNMP agents and managers. This includes:

Developing An SNMP Agent

Developing an SMNP Agent using the Java Dynamic Management Kit involves four steps:

mibgen parses an SNMP MIB and generates the following:

MBeans generated by mibgen need to be updated to provide the definitive implementation.

SNMP agents developed with the Java Dynamic Management Kit are extensible in that MIBs can be added or removed during an agent's lifetime. They are open, as SNMP is not the only protocol available, and HTTP, HTML and RMI protocol adaptors can also be used to access the agent. They can be SNMP-only because the SNMP adaptor can be used alone and the MBean server is not mandatory.

SNMP MIB Compiler -- mibgen

The mibgen compiler takes as input a set of SNMP MIBs and generates standard MBeans that you can customize. MIBs can be expressed using SNMP v1 or SNMP v2 syntax.

The mibgen compiler is able to process:

The mibgen compiler also generates the Java source code required for representing a whole MIB in an SNMP agent. Table objects provide methods for adding and removing entries from the table.

When the whole MIB file is registered in the MBean server, all the associated groups are automatically instantiated and added to the MBean server. The Java Dynamic Management Kit 4.1 supports nested SNMP groups in MIB definitions, enabling you to register groups below groups in the MIBs.

SNMP Protocol Adaptor

The SNMP adaptor implements the SNMP v1 and v2 protocol stack. The protocol adaptor is able to manage an unlimited number of different MIBs. By providing a unified view of all the MIBs, the SNMP adaptor solves the sub-agent problem that commonly occurs with SNMP. The SNMP protocol adaptor allows MIBs to be loaded or unloaded dynamically. This enables a MIB to be loaded into, updated, and unloaded from an agent while it is running.

SNMP Manager API

The SNMP manager API is a set of Java classes that simplify the development of applications for managing SNMP agents. The agents may be developed using the Java Dynamic Management Kit 4.1, or by other means. The javax.management.snmp.manager package contains the classes and interfaces which make up the main components and functions of the API.

The Java Dynamic Management Kit 4.1 also provides an example program, showing how an SNMP proxy is used to allow a manager to access two MIBs (one local and one remote) through a single proxy agent The source code for the proxy object and the sample application is available in the Snmp/Proxy example directory located in the main examplesDir.

For more information regarding the SNMP toolkit, refer to the Java Dynamic Management Kit 4.1 Tools Reference, Java Dynamic Management Kit 4.1 Tutorial and Java Management Extensions Instrumentation and Agent Specification, v1.0 documents.