Home
About NuDesign
Sales
Support
Eval Download
Partners
Testimonials
SNMP Links
Tutorials
News

Quick Start – Working with a Remote SubAgent

Please see the detailed discussion on Remote Subagents provided in the ‘Remote Subagent’ section in the Reference.  This section will show you how to run the Garage mib as a remote subagent.  Remote subagents run in their own processes.  They register and communicate with the Master SNMP agent through IPC.  The Master agent receives the SNMP request from the manager, and then sends the request to the remote subagent. The subagent fulfills the request and sends a response back to the Master agent, which in turn sends the response back to the SNMP manager.  

NuDesign Multiprotocol Master Agent service is equipped to work with Remote Subagents created by the xAgentBuilder product.  Garage remote subagent will register with the NuDesign Master Agent service and then the two entities will communicate if a request for the Garage objects is received by the Agent service.  The code generation wizard, xAgentBuilder, creates a number of projects as described in the section ‘Understanding Projects and Files Created by Visual xAgentBuilder for C++’.  Compile the ‘GarageREM’ project and then follow the steps below:

1)       Run the NuDesign Multiprotocol Agent Service

2)       Load the Garage mib in NuDesign Visual MIBrowser

3)       Walk the mib from the Garage node found under NuDesign Team branch

4)       No results will return from the agent

Now, run the GarageREM from the debugger. You should see the following output

Run the walk command again in Visual MIBrowser and you should see values coming back from the agent.

 

Remote subagents can also be run with a standalone master agent. &nbspNow we will see how ‘GarageEXE’ project can be modified to run as a master agent that communicates with Garage Subagent.  The following modifications with be required ;

1)    Add to StdAfx.h

   #include "subag/NDSubAg.h"

 

2)    Add NDSubAg.lib to the list of libraries in Link settings.

3)    Remove / Comment out the following lines in main()

    ExtAgents extAgents(&mh, &agents);
   extAgents.Load();

    ….

   extAgents.Unload();

 

4) Replace the above definitions with

 

   BSAMaster sam(&mh,&tm);
  sam.Init(&nv);
  sam.Start();

5)    Make sure agent's XNV has the following section

    [SAMaster]
    Port=10001

6)    Compile and run GarageExe. While GarageExe is running, run GarageREM.  Use the Visual MIBrowser to confirm that Garage objects are being accessed.