IBM Tivoli Composite Application Manager for Application Diagnostics, Version 7.1.0.1

Define custom requests

By default, only certain types of Java classes and methods are monitored as requests by the data collector. Servlets, JSPs, EJB business methods, and certain standard J2EE APIs are recognized as requests. You can designate additional classes and methods as custom requests.

For example, ITCAM will not recognize Struts Action classes as requests by default, however you can set up custom request definitions, and cause the Actions to be recognized as Nested Requests.

To enable monitoring of custom requests, and designate one or more methods as custom requests:

  1. Make a copy of...

      DC_home/itcamdc/etc/custom_requests.xml

    ...in a temporary location. Open the copy in a text editor.

  2. Modify the parameters in the file.

    Tag name Description
    edgeRequest One or more application methods that are to be Byte-Code-Instrumented for custom request processing. By modifying the requestName, Matches, type, and methodName tags within the edgeRequest tag, you can customize the selection.

    Each edgeRequest tag must contain exactly one methodName tag, and one or more Matches tags. Multiple edgeRequest tags can be specified.

    requestName Unique name for this request. The request name is displayed to the user when the method entry and exit is traced.
    Matches Class or classes containing methods to be Byte-Code-Instrumented for custom request processing. Multiple Matches tags can be present within a single edgeRequest tag.
    type Indicates whether or not a class must be a system or application class in order to match the edgeRequest tag.
    methodName Names of the methods within one of the classes identified by the Matches tag that are to be Byte-Code-Instrumented for custom request processing. Exactly one methodName tag can be specified in each edgeRequest tag.

    The Matches and methodName tags can include wildcard characters. The following section describes how the wildcard characters works:

    • Asterisk (*) stands for zero or more occurrences of any character when used by itself. When embedded within a sequence of characters (for example, java.*.String), it matches zero or more occurrences of any character except the package separator (.).

    • Two periods (..) can be used to specify all sub-packages.

      It matches any sequence of characters that starts and ends with the package separator (.).

      For example...

        java..String

      ...matches...

        java.lang.String

      ...and...

        com.ibm..*

      ...matches any declaration beginning with com.ibm.

    For example, an application with a package name of com.mycompany.myapp has the following requirements:

    • Within the Customer class, the creditCheck() method should be treated as a custom request called CreditCheck.

    • Within the Supplier class, the inventoryCheck() method should be treated as a custom request called SupplyCheck.

    The following example shows the contents of the customized custom_requests.xml file that accomplishes this:

        <customEdgeRequests>
              <edgeRequest>
                      <requestName>CreditCheck</requestName>
                      <Matches>com.mycompany.myapp.Customer</Matches>
                      <type>application</type>
                      <methodName>creditCheck</methodName>
              </edgeRequest>
              <edgeRequest>
                      <requestName>SupplyCheck</requestName>
                      <Matches>com.mycompany.myapp.Supplier</Matches>
                      <type>application</type>
                      <methodName>inventoryCheck</methodName>
              </edgeRequest>
        </customEdgeRequests>   

  3. Complete one of the following steps:

    • Save the file in...

        DC_home/runtime/app_server_version.node_name.server_name/custom

      Then, in the toolkit custom properties file set the...

        property am.camtoolkit.gpe.customxml.custom

      ...to the name (without path) of the file you modified in Step 2.

    • Save the file in any directory on your computer.

      In the toolkit custom properties file set the property...

        am.camtoolkit.gpe.customxml.custom

      ...to the path and name for the file you modified in Step 2.


Parent topic:

Tune data collector performance and monitoring scope

+

Search Tips   |   Advanced Search