6.0 Testing Multi-Protocol agent

 


6.1 Overview

6.2 SNMP Testing using MIB Browser

6.3 Configuring MIB Browser

6.4 RMI/CORBA/HTTP Testing using MBean Browser

6.5 Configuring MBean Browser

6.6 TL1 Testing using TL1 Browser

6.7 Sample TL1 Commands

6.8 Configuring TL1 Browser

6.9 HTML Testing using HTML Browser


 

6.1 Overview

 

This section explains the steps involved in testing the Multi-Protocol agent using various adaptors. It is assumed  that a Multi-Protocol agent is created using AGENT-SAMPLE-MIB following the steps given in the topic Creating a Simple Multi-Protocol agent using JMX Compiler and the Multi-Protocol agent is started at the following port numbers :

6.2 SNMP Testing using MIB Browser

 

To test the agent in SNMP Adaptor,

To know more about the SNMP operations that can be performed on the agent, please refer to the topic, " Testing the Agent", under the section Building SNMP Agents.

 

6.3 Configuring  MIB Browser

 

Please refer the topic "Testing the SNMP Agent": in the Building SNMP Agents Section to know more about using MIB Browser and its configurations.

 

6.4 RMI/CORBA/HTTP Testing using MBean Browser

 

To test the agent using the RMI Connector / CORBA Connector or HTTP Connector,

Note: The MBean Browser can also be started from the Launcher or by executing the MBean Browser.bat/MBean Browser.sh from the <Agent Toolkit Home>/bin directory.

6.5 Configuring MBean Browser

 

The AdventNet MBean Browser is a Manager application which enables the user to access a Multi-Protocol agent's MBeans and use the provided services through the RMI / CORBA/ HTTP protocol adaptor or connector. To accomplish this, the Multi-Protocol agent must be started which instantiates the different adaptors/connectors at their specified port numbers.

 

The MBean Browser uses the client side API provided for accessing the MBeans through the connectors (RMI Adaptor or CORBA Adaptor) at the server side. The default hostname and the ports are:

Once the MBean Browser establishes connection with a particular adaptor or connector, access to all the MBeans registered with the MBean server is provided through the respective connectors. The Remote Object Browser supports the MBean Tree View by listing all the MBeans registered with the MBean Server in a tree structure.

 

This section explains how to work with the test tool - MBean Browser.

 

6.5.1 Connect/Disconnect

 

To connect or disconnect to the server, do the following steps:

6.5.2 Configuring Discovery Service

6.5.3 Configuring Heart Beat Mechanism

 

In a client-server architecture, the connection between these two entities is indispensable for any transaction to be performed. The heart beat mechanism determines the existence of such connection through constant monitoring action.
 
The RMI/ CORBA/ HTTP client (Manager) is connected to the server (Agent) through the respective connectors. If the server is down or the agent to which the client is connecting is not running at the specified port due to some reason, the manager does not know the status of the agent and keeps sending queries and waits for the reply for a particular time interval. If there is no response even after the specified time interval it throws an error message.

To avoid this delay, the manager can poll the agent at specified intervals, to know the status of the connector. This is done using the Heart Beat Service.

 

Select Operations -> Heartbeat Service. This  displays the Heart Beat Settings dialog.

In order to start the Heart Beat service select the Enable Heartbeat option.

 

Specify the time interval (in seconds) at which the manager has to poll the agent as Heartbeat rate and click OK.

 

This will enable the Heartbeat service in the manager.

 

6.5.4 Register/Unregister MBean

 

The Register/Unregister service allows the user to Register or Unregister an MBean with the MBeanServer through the MBean Browser.

The mandatory fields to register the MBean are DomainName , Key/Value Pairs, ClassName.

DomainName :The DomainName is the domain under which the MBean has to be registered.  For example, Adaptors, Services, JMImplementations etc Keys: The DomainName and the Key/Value Pairs together form the ObjectName.  For example, type=AgentSystemInstrument ClassName :The ClassName is the name of the class of the MBean. This class should be in the CLASSPATH for the MBean to get registered or else, the MBean does not get registered.

 

XML File Name : Defining this field is optional. The XML FileName has to be specified in the case of registering a ModelMBean. The XML File Name path should be specified in relation with the JMX server.

 

Class Loader : Defining this field is optional. If the ClassLoader is not specified, the default Java ClassLoader is used to register the MBean with the MBeanServer. If the classloader is explicitly said, then that ClassLoader is used to register the MBean.

 

UnRegister :To UnRegister the MBean from the MBeanServer, it is enough to specify the ObjectName of the MBean.(i.e) the DomainName and the Key/Values pair of the MBean.

      Note: The XML FileName has to be specified in the case of registering a ModelMBean

6.5.5 Configuring Client Settings

 

The settings for the client can be specified using the option Settings -> Client Settings .  This will display the following user interface with the default values. Please enter the values for the various fields before trying to connect to the agent.

 

Client :  Select the Client through which you would like to connect to the server RMI/ CORBA/ HTTP.
Host Name
: Specify the host name of the Multi-Protocol agent.
Port Number
: Specify the port number where the Multi-Protocol agent is running.

 

6.5.6 Filtering MBeans

 

When MBean Browser is connected to a server, all MBeans registered with the server are listed in the MBean tree view. The Filter Service helps the user view only those MBeans that satisfy a given filter condition ( Filter pattern).

 

The Syntax for Filter pattern according to JMX Specifications is given below:

<DomainName>:<key>=<value>

*is used to denote any character sequence, including an empty one
?    is used to denote a single character
 
Enter the Filter Pattern in the space provided above the MBean tree on the left side of the browser. Now, only those MBeans which have DomainName, Key and Value matching those in the Filter pattern will be displayed in the tree view .
 
For example,

 

To view the list of all MBeans present in the domain JMImplementation, the syntax to be given in the Filter MBean is :
 
JMImplementation:* or *Implementation:*

 
To view particular MBeans of the domain JMImplementation having key and value as type and XXX respectively, the syntax to be followed for the Filter Pattern is :
 
*Implementation:type=XXX     
(or)
JMImplementation:type=XXX

 

6.5.7 View Notifications

 

Management applications need to react to a state change or to a specific condition when it occurs in an underlying resource. XMOJO JMX implementation supports JMX Notification Model which allows MBeans to broadcast such management events, which are called notifications.

 

Select the View -> Notification option to view the notification details generated by the agent.

 

6.6 TL1 Testing using TL1 Browser

 

To test the agent using TL1Adaptor, follow the steps given below:

Note:The TL1 Browser can also be started from the Launcher or by executing the TL1Browser.bat/ TL1Browser.sh from the <Agent Toolkit Home>/bin directory.

Select AGENT-SAMPLE-MIB.tcs , expand the tree and select the node, for example AGENT_SAMPLE_MIB-AgentSystem under GET-SCALAR group. Do a query by selecting the   icon or by selecting Operations -> Send  from the menu bar. You will find the response from the agent displayed in the response block as shown below.

Here, the agent responds with the default values specified .  You can repeat this operation with other commands listed in the TCS tree.

 

6.7 Sample TL1 Commands

 

Few example TL1 Commands used for querying the MIB have been given under for better understanding,

  1. GET-SCALAR::AGENT_SAMPLE_MIB-AgentSystem-agentLocation:1::;
    This will get the value for agentLocation.

  2. GET-SCALAR::AGENT_SAMPLE_MIB-AgentSystem:1::;
    This will get the values of all the child nodes under the AgentSystem group.

  3. GET-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable-adiskCapacity:2::3;
    This will give instance 3 for column adiskCapacity.

  4. GETALL-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable:3::;
    This will give all the rows in the adiskTable.

  5. GETALL-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable:4::3;
    This will give the 3rd row in the adiskTable.

  6. GETALL-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable:5::3,5;
    This will give the rows 3 to 5 in the adiskTable.

  7. SET-SCALAR::AGENT_SAMPLE_MIB-AgentSystem-agentName:6::agent;
    This will set the value "agent" for agentName.

  8. SET-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable adiskCapacity:7::1:240;
    This will set the value 240 for the 1st instance of adiskCapacity. If a table has multiple indices, they can be specified seperated by comma. Eg) ....:1,2:Team;

  9. CREATE-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable:8::1,Name,10,4,6;
    This will create a row for adiskTable with the given values. Note that the index is given as one of the values. Here 1 is the index.

  10. DELETE-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable:9::1;
    This will delete the row with instance 1 in the adiskTable.

Thus, GET is used to get the value of a node.
    SET
is used to modify the value of a node in a table or a scalar group.
    CREATE
is used to create a row in the table and
    DELETE
is used to delete a row in the table.

 

The Access Identifier specifies the MIB name, group name and the node name separated by hyphen. The Message Payload block contains the message - Instance, Value to be set etc.

 

6.8 Configuring TL1 Browser

 

Please refer the topic Configuring TL1 Browser Settings in the Building TL1 Agents section to know more about using TL1 Browser and its configurations.

 

6.9 HTML Testing using Web Browser

 
 

Copyright © 1996-2004, AdventNet Inc. All Rights Reserved.