IBM Performance Management

Full agent testing

Use full agent testing to test all attribute groups of your agent together. You can also use full agent testing to test data sources that cannot be tested by using the attribute group test function.

About this task

You can use full agent testing to run the agent in the same way it runs in IBM® Tivoli® Monitoring without needing an IBM Tivoli Monitoring installation.
Important: On Windows or AIX® systems, If you want to run a full test of the agent inside Agent Builder (see Full agent testing), ensure that the 32-bit version of the operating system on which you are running the Agent Builder, that is, 32-bit Windows or AIX, is selected in the Agent Information window. On Linux systems, the 64-bit version must be selected.

Procedure

  1. Open the Agent Test perspective:
    1. In the agent editor, open the Agent Information tab.
    2. Click Test the agent.
      Figure 1. Test Agent section of the Agent Editor, Agent Information page.
      Test Agent section of Agent Information page.

      Alternatively, from the Agent Builder menu select Window > Open Perspective > Other, select Agent Test and click OK

    The Agent Test perspective opens (Figure 3). The Agent Test view shows agents that you have opened in the agent editor; you can test any of these agents. An Attribute Group Test view is also displayed; this view is initially empty. The Attribute Group Test view shows data that is collected from a selected attribute group when the agent is running.
    Tip: If no agents are being edited, the Agent Test perspective is empty. To populate the view, go to the IBM Tivoli Monitoring perspective and open an agent in the Agent Editor. When an agent is opened in the Agent Editor return to the Agent Test perspective to test the agent.
  2. Optional: Configure environment variables and configuration properties before you start the test. You can access the Environment Variables and Runtime Configuration windows in two ways from the Agent Test view:
    • Right-click the agent in the Agent Test view to open a selection menu. You can select Set Environment from the menu to open the Environment Variables window. You can select Configuration from the menu to open the Runtime Configuration window.
    • Click the view menu icon view menu icon on the Agent Test view toolbar to access the Set Environment and Configuration menu items as in the previous choice.
    For more information about using the Environment Variables and Runtime Configuration windows, see Attribute group testing.
    Important:
    1. The agent is populated automatically with the last set of configuration that relates to each tested attribute group.
    2. Some environment variables can have different default values for attribute group testing and for full agent testing. For more information about environment variables with special values for attribute group testing, see (Test Environment variables).
    3. If a JMX data source connects to a remote WebSphere Application Server, ensure that a local WebSphere Application Server is installed and that the Java location is set to the JRE that this server uses. For details about setting up the connection, see Monitoring Java Management Extensions (JMX) MBeans.
    4. In a Java API, JDBC, JMX, HTTP, or SOAP data source, you can use the Java > JVM arguments setting to control agent trace logging. Set the following value:
      -DJAVA_TRACE_MAX_FILES=files -DJAVA_TRACE_MAX_FILE_SIZE=size
      where files is the maximum amount of trace log files that are kept (the default value is 4) and size is the maximum log file size in kilobytes (the default value is 5000). For example, you can set the following value:
      -DJAVA_TRACE_MAX_FILES=7 -DJAVA_TRACE_MAX_FILE_SIZE=100
      In this case, the agent writes 100 kilobytes into the first log file, then switches to the second log file, and so on. After writing seven log files of 100 kilobytes each, it overwrites the first log file.
    5. If your agent has subnodes, in an installed version you can set different configuration values for different subnodes and separately for the base agent attribute groups. However, in full agent testing configuration you can only set every configuration value once; the setting applies to the base agent and any subnodes. You can only test one instance of every subnode.
  3. In the Agent Test view, select the agent that you want to test and click the Start agent icon Start Agent icon.

    A window indicates that the agent is starting. When the agent starts, its attributes groups are shown as children of the agent in the Agent Test view. The attribute groups are indicated by the attribute group icon attribute group icon.

    The status attribute groups that give information about the agent (Performance Object Status, Thread Pool Status and Take Action Status) are also shown as children of the agent in the Agent Test view. The status attribute groups are indicated by the attribute group icon information icon.

    You can start and run more than one agent at the same time.

    The Stop agent icon Stop Agent icon becomes available when the agent is started.

    If your agent has subnodes or navigator groups, they are shown as nodes in the Agent Test view. Subnode definitions are shown under the agent. A subnode instance node is shown under the subnode definition node. Attribute groups and navigator groups are shown under the subnode instance node. For example:
    Figure 2. Agent Test view with example subnode and navigator group highlighted.
    Agent Test view that shows Subnodes and Navigator groups.
    You can right-click on any of the nodes in the Agent Test view to access menu selections like Edit and Stop Agent. Edit opens the Data Source Definition for the selected node in the Agent Editor.
    Note: Changes that you make with the Agent Editor are not visible in the running agent until you stop and restart the agent.
  4. In the Agent Test view, select the first attribute group that you want to test.
    When you select an attribute group, a data collection begins for the selected attribute group. If the collection takes some time, a window indicates that the data collection is in progress. When the data collection is complete the collected data is displayed in the Attribute Group Test view, for example:
    Figure 3. Agent Test perspective
    Agent Test perspective that shows a selected http attribute group and that shows results of a data collection in the results area.
    If no data is displayed, a message 0 data rows returned is shown in the Attribute Group Test view. There are several reasons why the agent might not return data. These reasons include:
    • There is no data
    • Incorrect definition
    • Incorrect configuration
    You can check the reason why no data is returned by looking at the value of the Error_Code in the Performance Object Status attribute group. For more information about viewing the Performance Object Status attribute group, see step 9

    To collect data for another attribute group in the running agent, select the required attribute group.

    When you select an attribute group in the Agent Test view, the corresponding attribute group is displayed in the Agent Editor view.
  5. Optional: Run a second data collection, after the initial data collection, for certain attribute group types, to get useful data values. To run a data collection, click the collect data icon Collect data icon in the Attribute Group Test view.

    If the collection takes some time, a window indicates that a data collection is in progress. When the data collection is complete, the newly collected data is displayed in the Attribute Group Test view.

  6. Optional: Click an attribute column heading in the Attribute Group Test view to open the Attribute Information in the Agent Editor Data Source Definition tab. You can also access the same Attribute Information by right-clicking on any data cell in the table and choosing Edit from the menu. You can edit properties of the attribute in the normal way. Changes that you make are not visible in the running agent until you stop and restart the agent.
  7. Optional: Open multiple Attribute Group Test views at the same time. To open an additional Attribute Group Test view, click the view menu icon view menu icon on the Attribute Group Test view toolbar and then select Open view for attribute group.
    Note: When an additional Attribute Group Test view is opened, it displays the same attribute information as the original Attribute Group Test view. You can then select another attribute group in the Agent Test view to display different attribute group information in the original Attribute Group Test view. The first time another Attribute Group Test view is opened, it opens in the same location as the original view but with its own tab. If you want to see the two views simultaneously, you can drag the tab to another location in the workspace.
  8. Optional: Select the subnode instance information attribute group, if your agent has subnodes, to see how the subnodes are listed in your agent (Figure 2). Selecting the subnode instance information attribute group shows subnode instance information in the Attribute Group Test view (for all online subnodes of the selected type).
  9. Optional: To see more information about the operation of the agent, you can select the Performance Object Status and Thread Pool Status attribute groups in the Agent Test view. These status attribute groups are indicated by the information icon information icon. Select these groups to see status information about earlier data collections for your attribute groups.
    For example:
    Figure 4. The Attribute Group Test view that shows more information (Performance Object Status) about data collections for the Managed_URLs and Managed_Nodes attribute groups
    The Attribute Group Test view that shows more information (Performance Object Status) about data collections for two attribute groups. There is one row of data per attribute group.
  10. When you are finished testing your agent, click the stop agent icon Stop agent icon