Rogue Wave JViews TGO Sample: Integration - SNMP


Description

This sample shows how to use the SNMP features of the Rogue Wave JViews TGO predefined business objects.

How to Use the Sample

The main frame contains a Network component, a Tree component and a Table component.

A Network component has a default toolbar which provides a set of predefined interactors:

In this sample, a new toolbar button is available allowing you to register new network nodes. These network nodes represent real resources which should be manageable using the Simple Network Management Protocol. To create the network nodes, provide the IP address of the resource, as well as the community information. You can also specify which type of network element should be used to represent the resource graphically.

Each added node is considered as an IP node, whose management information will be queried using the Simple Network Management Protocol (SNMP). In order to retrieve information from the underlying SNMP agent, this sample assumes that the object identifier is the IP address of the element in the network, and that the object being added has an SNMP agent running. See How to Run an SNMP Agent for more information.

Once a network node is added, it becomes visible in the Network, Table and Tree components, which are all connected to the same data source. At this point, the application queries the initial SNMP information about the resource:

The following image illustrates how a network node can be represented using the SNMP Object State

Besides the system information, if the node contains interfaces, this sample will query the interface information.

For each interface recognized in the node, a network element is created to represent it in the components. This network element is added as a child of the IP node. The containment relationship can be seen in the Tree component view. Once the interface node is created, the sample will once again send requests to the SNMP agent to retrieve the following information:

To see the interface information for a specific node, expand the node in the Tree component and select one of the interfaces.

The interface will then become visible also in the Network and Table components.

When you select a tree node, the corresponding graphic objects are selected in the Network and Table components. When you select a row in a table, the corresponding object is made visible and selected in the Network component.

All components are connected to the same data source and display the nodes that you create using the mechanism mentioned above or by loading an XML file.

When all the nodes that you are interested in have been created, you can save this information for future use. To save the nodes in an XML file, go to File menu and select Save.

Besides the containment relationship, system and interface information, it is also possible to specify that the application receives traps and management information for certain nodes and interfaces. To configure this, display the object pop-up menu, and select Edit Configuration.

In the case of nodes, it is possible to specify that the sample polls the agent from time to time to retrieve system information. Doing so, the sample can be aware of changes in the underlying interfaces statuses and update the node accordingly. In the same dialog, you can specify that the sample receives traps for the nodes. All traps can be seen in the Trap Viewer dialog, accessible through the View menu, option View Traps.

In the case of interfaces, the configuration allows you to specify some indicators that will be queried from time to time and can be used to analyze the overall interface performance. You can select among the following indicators:

The indicators are presented in the interface objects as secondary states. The values are computed in a rate of number of packets per second or number of octets per second.

You can visualize the nodes and interfaces that are being polled by the application, through the Node Configuration and Interface Configuration panels, accessible through the View menu, options View Node Configuration and View Interface Configuration.

This sample logs messages whenever the response received from the underlying SNMP agents has an error or could not be handled due to a timeout. You can verify whether such situations have occurred by checking the Log Viewer dialog, accessible through the View menu, option View Log Messages.

How to Run the Sample as an Application

This sample can be run as an application. The installation directory contains an executable JAR file, integration-snmp.jar, that allows you to execute the sample with a double click from a file browser. Note that if you are using Internet Explorer, you can open the installation directory and execute the JAR file from the browser. This technique may not work in other Web browsers.

Alternatively, you can run the sample application from the command line. First check that the Ant utility is properly configured. If not, see the instructions on how to configure Ant for Rogue Wave JViews.

Then, go to the installation directory of the sample and type:

ant run

Topics Covered

Detailed Description

The architecture of this sample is composed of two major parts:

The illustration below gives an overview of the application architecture:

How to Run an SNMP Agent

This sample assumes that SNMP agents are running in the different nodes that are registered in the data source.

Installation Directory

The Integration - SNMP sample is installed here.

Classes Involved

Source Files

Copyright © Rogue Wave Software, Inc. 1997, 2015. All rights reserved. Legal terms.