Configuring transaction tracking for the WebLogic agent

The transaction tracking capability of the WebLogic agent requires changes to the agent instance environment settings file and the WebLogic server startup file. A script is provided to help you make the changes.

Before you begin

Linux or AIXEnsure that the resource limit for open files is greater than 5,000 for the transaction tracking toolkit to work properly.
  • Display the current open file limit setting. ulimit -n
  • Example setting the open file limit to 5,056. ulimit -n 5056
Perform Configuring WebLogic monitoring Windowsstep 1 or Linux or AIXstep 2 before you follow this procedure.
Note: Transaction tracking capability is available for the WebLogic agent in the Cloud APM, Advanced offering. For the WebLogic agent with basic resource monitoring capability, which is in the Cloud APM, Base offering, skip this step.

The WebLogic agent must be installed locally to the WebLogic server that is monitored with the transaction tracking capability.

The user account that runs this script must have write permission to the following directories and files:
  1. The WEBLOGIC_HOME directory.
  2. The WEBLOGIC_HOME/bin directory and files.
  3. The install_dir/config directory.
  4. The install_dir/config/hostname_wb_instance_name.cfg file.
where
WEBLOGIC_HOME
WebLogic server installation directory.
install_dir
Path where the agent is installed. The default paths to these logs are as follows.
  • Linux or AIX/opt/ibm/apm/agent
  • WindowsC:\IBM\APM\TMAITM6_x64
hostname
Name of the host computer where the agent is installed.
instance_name
Name of the agent instance that is assigned in the agent configuration method topic:
  • Configuring the agent on Windows systems, step 3
  • Configuring the agent by responding to prompts, step 1
  • Configuring the agent by using the silent response file, step 2

Procedure

Run the simpleConfig script.

  1. Log in to the WebLogic server with the WebLogic agent installed.
  2. Change directory to the agent installation directory.
    • Linux or AIX install_dir
    • Windows install_dir\TMAITM6_x64

    where install_dir is the path where the agent is installed.

    The default install_dir paths are listed here:
    • Linux or AIX/opt/ibm/apm/agent
    • WindowsC:\IBM\APM\TMAITM6_x64
  3. Change directory to wbdchome/8.1.4.0.0/bin.
  4. Run the setup script.
    • Linux or AIX ./simpleConfig.sh
    • Windows simpleConfig.bat
  5. Follow the prompts to enter parameters for your environment:
    1. Choose the WebLogic agent instance_name and subnode to configure from the list of detected agent instance and subnode combinations where instance_name is the name of the agent instance.
    2. Type the number of the WebLogic server startup method.
    3. Type the WebLogic domain root search path.
      This path is used as the base from which to search for WebLogic domains. If the WEBLOGIC_HOME environment variable is set, its value is offered as the default value.
    4. Type the number of the WebLogic domain for the WebLogic server to configure.
    5. Type the number of the WebLogic server name to configure.
    LinuxExample configuration with a WebLogic startup method of WebLogic startup script.
    ./simpleconfig.sh
    
    The following agents and subnodes are not yet configured for transaction tracking:
    
    1) wlinst1 Server1
    2) wlinst1 Server2
    
    Type the number that corresponds to the agent instance and subnode that you want to configure.
    
    Type your selection here (For example: 1): 1
    
    The following WebLogic startup methods are supported:
    
    1) WebLogic startup script
    2) WebLogic Node Manager
    
    Type your selection here (default is 1): 1
    
    The path to begin looking for WebLogic domains.
    WebLogic domain search root (default is: ): /home/wlsadmin
    
    The found WebLogic domain paths are:
    
    1) /home/wlsadmin/oracle/user_projects/domains/ttdd
    
    Type the number that corresponds to the WebLogic domain containing the WebLogic server that 
    you want to configure.
    
    Type your selection here (For examble: 1): 1
    
    The following WebLogic servers are available for configuration:
    
    1) AdminServer
    2) Server1
    
    Select a WebLogic server name (default is: 2): 2
    INFO: [2000] Automatic configuration of agent environment file succeeded.
    INFO: [3000] Automatic configuration of WebLogic start script succeeded.
    INFO: [9000] Restart the WebLogic agent and WebLogic server for configuration to take effect.
    
  6. Follow these steps if WebLogic Node Manager is selected as the WebLogic server startup method in step 5.b. Otherwise, proceed to step 7.
    1. Open the weblogic_nodemanager_dc_opts file that is listed in information message number 3011 of the output text from step 5.
      WindowsExample configuration output with a WebLogic startup method of WebLogic Node Manager.
      INFO: [2000] Automatic configuration of agent environment file succeeded.
      INFO: [3010] Automatic configuration of WebLogic start script skipped.
      INFO: [3011] Please review C:\IBM\APM\TMAITM6_x64\wbdchome\8.1.4.0.0\runtime\ttdd_win\win_Server1\
      staging\weblogic_nodemanager_dc_opts.win for required WebLogic JVM start options.
      INFO: [9000] Restart the WebLogic agent and WebLogic server for configuration to take effect.
    2. Log in to the WebLogic console and select Environment > Servers.
    3. Select the server to configure.
    4. Select the Configuration > Server Start tab.
    5. Copy the server start arguments from the weblogic_nodemanager_dc_opts file to the server’s Start Server Arguments in the WebLogic console and save the changes.
      The server start arguments are all the lines that follow the comment line # Add the following lines to the server start arguments in the weblogic_nodemanager_dc_opts file.
    6. Ensure that the transaction tracking toolkit is in the shared library path at run time.
      Choose a method.
      • Update the Node Manager start script.
        Note: All WebLogic servers started by the Node Manager have this library path set with the transaction tracking toolkit object file libraries included.
        1. Open the weblogic_nodemanager_dc_opts file that is listed in information message number 3011 of the output text from step 5.
        2. Set the transaction tracking toolkit path in the Node Manager start script. The command to set the path is the line that follows the comment line # Make sure that the executable path available to the WebLogic server includes the toolkit lib directory in the weblogic_nodemanager_dc_opts file.
          • LinuxCopy the LD_LIBRARY_PATH line from the generated weblogic_nodemanager_dc_opts.linux file and paste it below the export JAVA_OPTIONS line in the Node Manager start script. Example, WEBLOGIC_HOME/user_projects/domains/domain_name/bin/startNodeManager.sh.
          • WindowsCopy the PATH from the generated weblogic_nodemanager_dc_opts.win file and paste it below the export JAVA_OPTIONS line in the Node Manager start script. Example, WEBLOGIC_HOME\user_projects\domains\domain_name\bin\startNodeManager.bat.

          where WEBLOGIC_HOME is the WebLogic server installation directory and domain_name is the name of the WebLogic domain.

      • Update the environment for the user account that starts the Node Manager.
        Note: All applications started by the user account have this library path set with the Toolkit object file libraries included.
        1. Edit environment settings for the user that starts the Node Manager.
          • Linux or AIXEdit the shell resource file or shell profile file. For example, in the bash shell, .bashrc or .bash_profile.
          • WindowsEdit Control Panel > System and Security > System > Advanced system settings > Environment Variables... > User variables for user_name > Path where user_name is the name of the user account that is used to start the WebLogic server.
        2. Set the transaction tracking toolkit path in the user account environment. The command to set the path is the line that follows the comment line # Make sure that the executable path available to the WebLogic server includes the toolkit lib directory in the weblogic_nodemanager_dc_opts file.
          • Linux or AIXCopy the export LD_LIBRARY_PATH line from the generated weblogic_nodemanager_dc_opts.linux file. If an export LD_LIBRARY_PATH line does not exist, add it. If it does exist, edit it to add only the path from the right of the equals sign to the existing path with the correct path delimiter.
          • WindowsCopy the set PATH line from the generated weblogic_nodemanager_dc_opts.win file. If a Path variable does not exist in the User variables for user_name section where user_name is the name of the user account that is used to start the WebLogic server, add it by entering Path as the variable name and the path from the right of the equals sign as the value. If it does exist, edit the value to add only the path from the right of the equals sign to the existing path with the correct path delimiter.
        3. Reload the environment.
    Warning: The startNodeManager scripts are generated by the WebLogic configuration utility. So you might lose your changes when the WebLogic configuration is run again.
  7. If the WebLogic server and the agent are running, restart them.

Results

WebLogic server files that are changed during transaction tracking configuration:
  • The startManagedWebLogic script.
    • Linux or AIXWEBLOGIC_HOME/bin/startManagedWebLogic.sh
    • WindowsWEBLOGIC_HOME\bin\startManagedWebLogic.cmd

    where WEBLOGIC_HOME is the WebLogic server installation directory.

    This file is updated with the configuration settings for the transaction tracking capability. Configuration markers are inserted into the file for use when you disable the transaction tracking capability. A backup file is saved in the WEBLOGIC_HOME/bin/bak/ directory before the script adds or removes the transaction tracking capability changes.

Agent files that are changed during transaction tracking configuration:
  • Agent instance configuration file
    • Linux or AIXinstall_dir/config/hostname_wb_instance_name.cfg
    • Windowsinstall_dir\TMAITM6_x64\hostname_WB_instance_name.cfg
  • Agent environment settings file
    • Linux or AIXinstall_dir/config/wb_instance_name.environment
    • Windowsinstall_dir\TMAITM6_x64\KWBENV_instance_name
where
install_dir
Path where the agent is installed. The default paths to these logs are as follows.
  • Linux or AIX/opt/ibm/apm/agent
  • WindowsC:\IBM\APM\TMAITM6_x64
hostname
Name of the host computer where the agent is installed.
instance_name
Name of the agent instance that is assigned in the agent configuration method topic:
  • Configuring the agent on Windows systems, step 3
  • Configuring the agent by responding to prompts, step 1
  • Configuring the agent by using the silent response file, step 2
Note: If the WebLogic agent is re-configured after WebLogic agent transaction tracking or diagnostics was configured, the agent environment settings file will be overwritten by the WebLogic agent reconfiguration. You need to re-run the steps in the Procedure section to configure the WebLogic agent transaction tracking or diagnostics data collector. Or else, you might see no transaction tracking data in the Application Performance Dashboard, and the default 5457 port is not listening.