16.1 JMX-SNMP Proxy : An Overview
16.2 Adding JMX-SNMP Proxy Feature
16.3 Accessing the SNMP Agent MBeans
16.4 Running the Example
16.1 JMX- SNMP Proxy: An Overview
An existing SNMP agent can be accessed through multiple protocols using the JMX-SNMP Proxy feature.
JMX-SNMP Proxy is a new feature provided by AdventNet. It helps to leverage legacy SNMP Agents and make them accessible through multiple protocols using the multi-protocol architecture.
This feature is used, if there already exists an SNMP agent that the user wishes to manage through the Multi-Protocol agent. Using the JMX-SNMP Proxy feature, the existing SNMP agent can be made to act as a sub-agent to the Multi-Protocol agent. The Multi-Protocol agent must be generated with the same MIB which the SNMP agent implements.
The Multi-Protocol agent, which supports the Proxy feature, acts as a Master Agent. It acts as a proxy and forwards the request to the SNMP Agent and provides the required information to the Manager. The manager receives the response through the same protocol using which the request was initiated.
Hence, to implement the SNMP Proxy feature, the following conditions must be met :
The sub-agent should be a SNMP agent.
The Master agent must implement the JMX-SNMP Proxy feature.
The Master agent must implement the same MIB as that of the SNMP sub-agent.
The communication between the agents must be in SNMP language.
If the sub-agent's traps are to be forwarded to the SNMP managers through master agent, the snmpTrap group in the RFC1907 MIB must be included in the Master Agent.
|
|
Note: The Multi-Protocol agent generated to leverage a legacy SNMP Agent can also implement MBeans of its own to manage its resources. It is not restricted to expose the information of the SNMP sub-agent alone. |
16.2 Adding JMX-SNMP Proxy Feature
JMX-SNMP Proxy is achieved by providing a JMX Wrapper Agent for the existing instrumented SNMP Agent. No instrumentation is needed to achieve this. The instrumentation is taken care of by the AdventNet API. You are just expected to generate a Multi-Protocol agent with the proxy feature and with appropriate protocols through which you wish to expose the manageable information. The proxy feature can be added to the Multi-Protocol agent from the JMX Compiler UI.
Using JMX Compiler UI
To add this feature, at least one sub-agent entry must be added to the JMX Proxy Table.
Select the Project -> Settings option. In the Settings Tree structure, select AdventNet Services -> JMX-SNMP Proxy, which displays the JMX-SNMP Proxy dialog on the right side.
Select the option, which displays the entry parameters of the JMX-SNMP Proxy Agent. The following information is specified here:
The SNMP sub-agent host IP address or name.
The Port number where the SNMP sub-agent is running.
The community name of the SNMP sub-agent.
The timeout value to receive a response from the SNMP sub-agent.
The MIBs loaded in the MIB Tree are displayed under MIB Modules. Select the MIB Module, which is implemented in the SNMP sub-agent.
Similarly, you can add any number of SNMP sub-agent entries, using the JMX Compiler UI.
If the community, host, and port number of the sub-agent have to be changed after generating the agent, JMXSNMPProxyMBeansConf.xml configuration file which is present in <Agent Toolkit Home>\jmxprojects\projectname\agent\bin\conf directory, can be used.
16.3 Accessing the SNMP Agent MIB Variables
Once the Master agent is started, you can interact directly with the sub-agent’s MIB variables. These MIB variables can be accessed using RMI, CORBA, HTTP, HTML, and TL1 adaptors as MBeans. All management operations such as modifying attribute value, get operation, and set operation can be performed on the MBeans. This gives exactly the same result as if the manager were connected to the sub-agent while performing the action.
|
|
Note: The SNMP sub-agent must be started at the specified port for enabling the connection between the Master Agent and the SNMP sub-agent. |
16.4 Forwarding the Sub-agent's SNMP Traps as Notification
The Master Agent, generated as mentioned above, opens an SNMP Session at the port number 8005 by default. When sub-agent sends a trap to this particular port, the Master agent will convert the trap to notification and forward it to its registered notification listeners. Thus, the notification can be viewed by all the adaptors and registered managers.
|
|
Note: If the port has to be changed, the below given line in the generated main file can be edited with the port number at which the user wish the master agent to listen,
jmxProxy.startListenerAndForwarder(new Integer(8005));
Then compile and start the agent. The Master agent listens at the port number mentioned.
Also, the SNMP trap can be forwarded to the SNMP Manager through master agent only if snmpTrap group in the RFC1907 MIB is included in the Master Agent. |
The JMX Proxy example is available in the <Agent Toolkit Home>/examples/jmx/jmxproxy directory. Using this example, you can access an existing SNMP agent implementing the RFC1213-MIB, through HTTP/RMI/CORBA.
The readme.html file explains the usage of the example and the steps involved in running the example.