First update the CICS TG environment, and install AGMServerExit, and AGMClientExit, the
components of Z APM Connect request monitoring exits.
Before you begin
Before you enable Z APM Connect CICS® Transaction Gateway (CICS TG) support, ensure that your system environment meets the
following requirements and software prerequisites are installed and configured:
- All available PTFs are applied to the your Z APM Connect z/OS® components. Available fixes are described in this tech note.
- The Z APM Connect Base's TTServerString is updated to point to the
address and port of Z APM Connect Distributed Gateway in the form of
tcp:ip_address:port
.
- The CICS TG uses IPIC protocol to connect to the desired CICS TS server.
- Java™ version 8 or later is installed on
- CICS TG client application environment.
- CICS TG environment.
Procedure
- Update your CICS TG environment.
- Apply CICS TG maintenance that allows transaction tracking
capabilities.
- (Deprecated) For CICS TG V9.1, apply at least APAR PH12365/PTF UI65325.
- For CICS TG V9.2 or later, apply APAR PH12635/PTF UI65916.
- In USS, locate your updated CICS TG libraries. Download
ctgclient.jar and cicseci.rar.
- Move the ctgclient.jar file to the system that you plan to run
client applications on. Replace the ctgclient.jar file that your client
application previously used as a dependency with the newer one.
- Optional: Replace the CICS TG ECI resource adapter (if using) with the
updated version.
-
Download the latest 6.2.0-INSTANA-FP<version_number>-plugins.tar.gz
file delivered in the latest fix pack from Fix Central.
- Extract the 6.2.0-INSTANA-FP<version_number>-plugins.tar.gz file
with the following command:
tar -xvzf 6.2.0-INSTANA-FP<version_number>-plugins.tar.gz
The following two files are extracted:
plugins
├── AGM-RequestExit.tar
└── ibm-agm-tmra-plugin-6.2.0-V.jar
- Extract the AGM-RequestExit.tar file with the following
command:
tar -xvzf AGM-RequestExit.tar
The following files are extracted:
AGM-RequestExit
├── AGM-RequestExit-Plugin.jar (for AppDynamics only)
└── AGM-RequestExit.jar
└── agmconfig.properties
└── log4j2.xml
- AGM-RequestExit.jar, which contains the AGMClientExit
and AGMServerExit classes.
- agmconfig.properties, a sample properties file that can be further
configured for your monitoring flow.
- log4j2.xml, a sample logging configuration file.
Note: These files also exist on the host side, in the /usr/lpp/IBM/agm
directory. The tar file is called AGMREQE.
- Attach the Z APM Connect supplied client-side monitoring exit to your client
application.
- Move the AGM-RequestExit.jar file to the machine that hosts your
client application.
- Add AGM-RequestExit.jar to the classpath.
If you use
the CICS TG ECI resource adapter, add AGM-RequestExit.jar to the resource
adapter's classpath instead of the client application's JVM.
- Add the following system properties to your client application's JVM:
allow.unsigned.sdk.extension.jars=true
AGM.CONF.LOCATION=
AGM.CONF.LOCATION specifies a directory you want to use for Z APM Connect
configuration.
- In your configuration directory specified by the environment variable
AGM_CONF_LOCATION, add a .properties file named
agmconfig.properties and set the property bootstrap.servers
to the address of your Z APM Connect DG in the form of
hostname:port
.
Note: A sample
agmconfig.properties file is provided with
AGM-RequestExit.tar.
- When invoking your client application, attach the client exit by setting the system
property requestExits to
com.ibm.zapm.ctg.exit.AGMClientExit.
For example,
java -DrequestExits="com.ibm.zapm.ctg.exit.AGMClientExit" mySampleApplication
- Optional: If you are using the CICS TG ECI Resource Adapter, ensure that
your J2C Connection Factory's property trackingtoken is set to
true.
- Start the Instana agent to monitor your client application.
AGMClientExit assumes that the client application is already traced by an
Instana agent.
- Obtain an Instana Java SDK package. Add the built jar to the class path. If using the
CTG ECI resource adapter, add the built jar to the resource adapter's classpath.
- Add the Z APM CICS TG tracking java package
(com.ibm.zapm.ctg.exit) to your Instana agent's
configuration.yaml. For more information about using the Instana java SDK
package, see Using the instana-java-sdk.
- Attach the Z APM Connect supplied server-side monitoring exit to your CICS TG.
- Move the AGM-RequestExit.jar file to the machine on which your
CICS TG runs.
- Add the AGM-RequestExit.jar file to the
classpath.
- In your CICS TG .ini file,
add com.ibm.zapm.ctg.exit.AGMServerExit to the requestexits
property.
- Add the following system property to your JVM:
AGM.CONF.LOCATION specifies a directory you want to use for Z APM
Connect configuration. If you are using an ENV file, you can add this property to the
CTGSTART_OPTS parameters.
- In your configuration directory specified by the environment variable
AGM_CONF_LOCATION, add a .properties file named
agmconfig.properties and set the property bootstrap.servers
to the address of your Z APM Connect DG in the form of
hostname:port
.
Note: A sample
agmconfig.properties file is provided with
AGM-RequestExit.tar
- Check the z/OS system’s /etc/hosts file to be sure the hostname and
IP of the DG are defined. For example,
Results
You successfully installed the Z APM Connect request monitoring
exits.To verify that
AGMClientExit is successfully attached to your client
application, set
agm.ctg.client.logging.level to
DEBUG and
check the log output for the following message:
AGMG0034D AGMClientExit completed initialization
To verify that
AGMServerExit is successfully attached to your CICS TG, set
agm.ctg.server.logging.level to
INFO and check the log output for the following message:
AGMG0035I AGMServerExit completed initialization
What to do next
By default, Z APM Connect request monitoring exits log messages at
the INFO level. For more information about how to customize this further, see
Changing the logging level of Z APM Connect's request monitoring exits.