Oid Based Dynamic Registration

Introduction:

This application allows Subagents to dynamically register with the Master Agent. Uses SNMP for the master subagent linkage (Relaying). Proxies requests to Subagents based on the oid with which the subagent is registered to the Master agent in the ProxyTable.

Overview:

This example is generated with oidBased proxy enabled in the MibCompiler->Project -> Settings->Proxy panel. Subagent entry is added for oid(OID - .1.3.6.1.2.1 ) and the port 8010 in ProxyTable. In this case Master Agent can be run at any port and the Subagent should be started at 8010. So the query for the oid under .1.3.6.1.2.1.1  group will be forwarded to the Subagent. Similarly you can also add some more entries in the proxytable with different oids and you can test more Subagents. New row can be added either from the manager or through SubAgent.xml file.

Source files:

1. MasterAgent:

MasterAgent.java

* DynamicRegistration class is instantiated.

* Created instance is registered with PduRequestHandler.

2. SubAgent:

Subagent is generated for RFC1213-MIB.

Compilation:

1. Go to <Installation Directory>\WebNMS\JavaAgent\examples\snmp\proxy\oidbased\agent\bindirectory and compile the source using,

    sh compile.sh (for Linux users) OR
    compile (for Windows Users)

Starting the Agents:

1. Start the Master Agent from <Installation Directory>\WebNMS\JavaAgent\examples\snmp\proxy\oidbased\agent\bindirectory using,

    sh run.sh (for Linux users) OR
    run(for Windows Users)

2. Start the Subagent from <Installation Directory>\WebNMS\JavaAgent\examples\snmp\proxy\subagent\agent\bindirectory using,

    sh run.sh (for Linux users) OR
    run (for Windows Users)

Now query any oid under .1.3.6.1.2.1.2 group present in the RFC1213-MIB. The Master Agent will proxy the request to localhost, port 8010 .
 

AdventNet oval logo
Copyright (c) 2009  ZOHO Corp. All Rights Reserved.