|
6.1 Overview
6.2 SNMP Testing using MIB Browser
6.4 RMI/CORBA/HTTP Testing using MBean Browser
6.6 TL1 Testing using TL1 Browser
6.9 HTML Testing using HTML Browser
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 :
HTML Adaptor - 8030
SNMP Adaptor - 8001
RMI Adaptor - 1099
Corba Adaptor - 1050
Http Adaptor - 8050
TL1 Adaptor -9099
6.2 SNMP Testing using MIB Browser
To test the agent in SNMP Adaptor,
Start the MIB Browser by selecting the Tools -> MIB Browser option from the Menu bar or by selecting the MIB Browser icon. Now, the MIB Browser opens with the AGENT-SAMPLE-MIB loaded in it.
|
|
Note: The MIB Browser can also be started .from the Launcher or by executing the MibBrowser.bat/ MibBrowser.sh from the <Agent Toolkit Home>/bin directory |
Expand the AGENT-SAMPLE-MIB tree. Select the enterprises node and do a query by selecting Operations -> GET or clicking on the GET icon. Now, you should see the agent responding with the default values as shown in the screen shot given below:
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.
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,
Start the MBean Browser by selecting the Tools -> MBean Browser option from the Menu bar or by selecting the MBean Browser icon from the status bar.
|
|
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. |
Select "RMI Client " in the remote browser and click "connect" button. It gets connected to the Multi-Protocol agent using the RMI protocol. You can see the MBeans in a tree structure in the left hand frame of the MBean Browser.
To access the attributes
and to invoke operations on MBeans, select the nodes from the tree. Click
to view the attributes displayed in the right frame. To modify the values,
simply overwrite the old value with the new one in the attribute panel
displayed or else click operations and perform a set command.
For example, select Operations for type=AgentSystemInstrumentExt. Select
the operation, setAgentDescr and specify the value as simpleJMXAgent.Click
OK button. You will find the modified value as shown in the screen
shot below.
Select "CORBA Client " in the MBean browser and click "connect" button. It gets connected to the JMX server using the IIOP protocol. It should display the changes made above.
For HTTP, select HTTP Client in the MBean Browser and click "connect" button. It gets connected to the JMX server using the HTTP protocol. Access the attributes and invoke operations on MBeans by selecting nodes from the tree.
Using MBean Browser, you can also perform the following services on the Multi-Protocol agent through RMI/CORBA/HTTP:
Register/Unregister an MBean from the MBean tree structure, using Settings -> Register/Unregister option.
Discover AdventNet Multi-Protocol agents in the network, using Settings -> Discovery Service option.
Poll the agent at specified intervals to know the status of the connector, using Settings -> Heartbeat Service.
Change the client settings, using Settings -> Client Settings option.
Select View -> Notifications to view the messages sent by the agent to the manager.
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:
Corba - localhost:1050
RMI - localhost:1099
HTTP - localhost:8050
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.
To connect or disconnect to the server, do the following steps:
Select the client through which you would like to connect to the server, from the Client Menu or from the Toolbar bar icon. You can opt for the client of your choice from the three options provided. The options are RMI, CORBA and HTTP client. Icons are also provided for the same. You can connect to only one protocol at a time.
On choosing the client, choose Operations -> Connect from the Menu bar or from the toolbar icon. Once the connection is established with the server, you will get the message "Connection established with <server name> at port <port number> in localhost " in the Status bar.
|
|
Note: Make sure the agent is running at the required port before trying to establish a connection with the server from MBean Browser. |
All the MBeans registered with the MBean server, will be listed in the left-hand side tree structure. The MBeans are grouped according to the Domains and listed under the root domain.
To disconnect the established connection, select Operations -> Disconnect from the Menu bar or from the toolbar icon.
To connect through a different client, you have to first disconnect the existing connection, select the client and get connected to the server.
6.5.2 Configuring Discovery Service
To discover the Multi-Protocol agents in a network, from MBean Browser, select the option Settings -> Discovery. This will display the Discovery Service Panel . Here, the default multicast group for AdventNet discovery service is 225.225.225.255 and multicast port is 8222. You can change this to any other IP Address and Port number. Also, specify the Timeout value within which the discovery client has to discover the Multi-Protocol agent.
Select the Start button to discover the Multi-Protocol agents running in the network, which has implemented the discovery service with the same multicast group and port.
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.
Select the Settings -> Register/Unregister option which will display the corresponding panel to enter the values. The various fields that are to be entered by the user to register/unregister an MBean are listed below:
Action
DomainName
Keys
ClassName
XML FileName ( optional)
ClassLoader. ( optional)
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.
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
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:
Start the TL1 Browser by selecting the Tools -> TL1 Browser option from the Menu bar or by selecting the TL1 Browser icon from the status bar. Now, the Browser is started.
|
|
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. |
Load command set file and corresponding data set file, which is under <projectName>/agent/src/com/myCompany/myPackage directory by selecting File -> Load option or load icon. A dialog prompts with the default command set and data set file. Select the Add option to browse and select the AGENT-SAMPLE-MIB.tcs file and AGENT-SAMPLE-MIB.dat file . Click OK to add it to the TL1 tree.
Choose Operations -> Connectoption in the Menu Bar. Enter the Host Name and Port Number where the agent is running in the dialog box that appears. By default the host name will be localhost and port number will be 9099. Click OK. Now, you will be connected to the Agent.
The next step is to Authenticate into the TL1 Agent . To do this, load the tl1security.tcs file using the File -> Load option. Select the command ACT-USER in the TL1 Security tree. The default user name and password for the Administrator are "root" and "public" respectively. Hence, select ACT-USER command and specify the user name as root in the AID block and the password (PID) public in the MPB block.
After entering the
user name and password values send the input message by selecting the
in the toolbar or by selecting
Operations -> Send from the menu bar. Now,
you will be authenticated into the TL1 Agent. The following autonomous
message will be sent by the Agent to notify the completion of authentication.
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.
Few example TL1 Commands used for querying the MIB have been given under for better understanding,
GET-SCALAR::AGENT_SAMPLE_MIB-AgentSystem-agentLocation:1::;
This will get the value for agentLocation.
GET-SCALAR::AGENT_SAMPLE_MIB-AgentSystem:1::;
This will get the values of all the child nodes under the AgentSystem
group.
GET-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable-adiskCapacity:2::3;
This will give instance 3 for column adiskCapacity.
GETALL-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable:3::;
This will give all the rows in the adiskTable.
GETALL-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable:4::3;
This will give the 3rd row in the adiskTable.
GETALL-ADISKTABLE::AGENT_SAMPLE_MIB-AdiskTable:5::3,5;
This will give the rows 3 to 5 in the adiskTable.
SET-SCALAR::AGENT_SAMPLE_MIB-AgentSystem-agentName:6::agent;
This will set the value "agent" for agentName.
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;
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.
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.
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
Start the Web Browser by selecting Tools -> Web Browser . This opens the HTML Browser with URL: http://localhost:8030. You will find the MBeans listed in a tree structure in LHS frame.
The MBeans are grouped under different domains. Select a Domain name, for example AppMBeans, which displays the MBeans in the selected domain . Select the MBean whose attribute you want to view and the related page gets displayed in the main frame as shown in the screen-shot below.
The attributes of the selected MBean are listed in table format with the following information: Attribute Name, Attribute Type, Attribute Access, Attribute Value, and Attribute Description. Values of Read-Write attributes are presented in editable text field.
Attributes of Tabular data type are displayed as a Table. New rows can be added using the New Row button at the bottom of the page. The Delete button can be used to delete a row from the table. In case the the attribute value is of type array then a link is provided in the attribute value column and on clicking the link, the values are listed in a separate page.
The dynamic HTML pages also allow you to perform operations on MBeans. If operations can be performed on an MBean, then the Operations button is displayed at the right-top corner of the the MBean attribute page. Clicking this button lists the operations that can be performed on the MBean. Selecting an operation displays the following information pertaining to the MBean operation:
Operation Name: The name of the MBean operation.
Return Type: The data type of the value returned after performing the operation.
Description: Short description about the operation.
Apart from these, SET operations are provided with text fields to specify the attribute values.
|