Tutorial xAgentBuilder 6

Tutorial – C++ Agent Studio – Visual xAgentBuilder® for C++

The Visual xAgentBuilder® evaluation demonstrates the speed and ease with which you can create an SNMP agent from a MIB file.

Open Microsoft Visual C++ (this page is for Visual Studio 6, please click here for Visual Studio .NET).

We will examine how to create an example agent with Visual xAgentBuilder for
C++ using the example MIB, NDGarage.mib
packaged with the product.

    • Start a new project. Select the Projects tab of the New
      dialog box.
    • Select the Visual xAgentBuilder for C++.
    • Enter the Project name.

You should see the following window:

    • Click OK.

The following window appears:

This wizard page describes the current application settings for the
xAgentBuilder project that you are creating.

If you want to use configuration parameters from another xAgentBuilder project, click on the Read settings … button and select an xAgentBuilder
configuration file.  After this action you can click the Finish button, and
the project will be created using the loaded parameters.  Or, you can first adjust
the settings to fit your requirements using the following steps.

    • Click Next button.

In this step we can select the type of agent project that we want to create.  By
default both the ExtensionDLL and Console style is selected.  The Static lib is greyed out and
shown as selected.  The Static lib project is in fact the place where
instrumentation will be created.  Both the ExtensionDLL and Console projects simply
add some “boiler plate” code and link to the static library.
Further information is available in the “Understanding Projects and
Files Created by Visual xAgentBuilder for C++” topic in this applications
help file.

If the HTML check box is selected (which is default) a set of web
pages will be generated for this agent.

    • Click Next button. The following window should appear:

In this step you can select whether you want to add proxy
support to the agent.  Proxy support can only be added to the standalone agent, so standalone
(Console) agent must be seleted in the previous step.  Code for the proxy will
be added conditionally.  You can choose this option now, and later recompile
your project with ND_SNMPv3_PROXY macro undefined to remove proxy support from
the agent.

    • Click Next button.  The following two windows should appear:

Click the button and the
Load MIB File dialog appears.  Select NDGarage.mib (in the
MIBS directory) and click OK.

    • Expand the tree by clicking the
      button.  You should see the following window.

    • Drag the garage node from the tree to the Subtrees list box on
      the right (as shown with red line).  If you made mistake and wish to remove node
      from the list, select it and click on the Remove button. Visual
      xAgentBuilder for C++ should now look like this:

  • Click Next button.  The following window appears.Here you can select default values for the MIB objects that will be implemented
    in the agent.
  • Click the Finish button. In a moment projects will be created:
  • Projet: file-view
  • Build the Garage project. Now right click GarageExe and choose “Select as
    Active Project
    ” from the menu. Build the GarageExe project and run
    it.  The following should appear when you run it:
  • Agent running in console wondow.
  • Use MIBrowser® to interrogate the agent
    via SNMP, use Web Browser to view the agent through HTTP or type ‘?’ at the prompt to get a
    list of commands that you can use from command line to view/modify the agent state
    and/or MIB objects.

 

Previous
Next

  Introduction   Visual MIBuilder   Visual xAgentBuilder   Visual MIBrowser