AppDynamics Application Intelligence Platform

3.9.x Documentation


Learn by Watching

Doc Maps

Skip to end of metadata
Go to start of metadata

The Java Agent identifies and tracks business transactions, captures statistics and diagnostic data, and analyzes and reports data to the Controller. The Java Agent uses dynamic bytecode injection to instrument a JVM and it runs as a part of the JVM process.

Caution: The Java Agent may fail if there are other Application Performance Management (APM) products installed in the same JVM.  They can coexist as long as the other APM does not interfere with the Java Agent class transformations. We discourage the simultaneous use of other Byte Code Injection (BCI) agents.

Overview of the Java Agent Installation Process

Installing the Java Agent involves adding it as a javaagent (Java Programming Language Agent) on your JVM and setting up connection and identifying parameters for it to report data to the Controller.

Install the Java Agent as the same user or administrator of the JVM. Otherwise the Java Agent may not have the correct write permissions for the system. The Java Agent directories must have write permission so that AppDynamics can update the logs and other Java Agent files.

Planning for Java Agent Installation

Before installing the Java Agent, be prepared with the following information.


Planning Item



Where is the startup script for the JVM?
If using a Java service wrapper, you need to know the location of the wrapper configuration.

This is where you can add startup arguments
in the script file and system properties, if needed.


What host and port is the Controller running on?

For SaaS customers, AppDynamics provides this information to you. For on-premise Controllers, this information is configured during Controller installation. See (Install the Controller on Linux or Install the Controller on Windows).


To what AppDynamics business application does this JVM belong?

Usually, all JVMs in your distributed application infrastructure belong to the same AppDynamics business application. You assign a name to the business application. For details see Logical Model.


To what AppDynamics tier does this JVM belong?

You assign a name to the tier. For details see Logical Model.

Important Files

In addition to the JVM startup script file, two other files are important during installation:

  • The -javaagent argument uses the fully-qualified path of the javaagent.jar file. No separate classpath arguments need to be added.
  • The <agent_home>/conf/controller-info.xml file is where you add the configuration mentioned in the planning list.

To Install the Java Agent

1. Download and unzip the Java Agent

  • Download the Java Agent ZIP file from AppDynamics Download Center.
  • Extract the ZIP file to the destination directory as the same user or administrator of the JVM. Take note of the following:
    • Extract the Java Agent to a directory that is outside of your container
    • All files should be readable by the Java Agent
    • Runtime directory should be writable by the Java Agent

Note: Do not unzip/install the Java Agent into to the ..\tomcat\webapps directory. By default Tomcat tries to undeploy and deploy files under the webapps folder. To avoid the possibility that Tomcat will occasionally not restart, we recommend installing the Java Agent to a directory outside of tomcat, such as \usr\local\agentsetup\AppServerAgent.

2. Add the Java Agent properties as a 'javaagent' argument to your JVM

This step adds the Java Agent to the startup script of your application server. Use the server-specific instructions below to add this argument for different application server JVMs:

3. Configure how the Java Agent connects to the Controller

  • Configure properties for the Controller host name and its port number.
  • You can configure these two properties using either the controller-info.xml file or the JVM startup script:

Configure using

Configure using
System Properties










For On-premise Controller installations: By default, port 8090 is used for HTTP and 8181 is used for HTTPS communication.
For SaaS Controller service: By default, port 80 is used for HTTP and 443 is used for HTTPS communication.

Optional settings for Java Agent-to-Controller communication

4. (Only for Multi-tenant mode or SaaS Installations) Configure Java Agent account information

  • This step is required only when the AppDynamics Controller is configured in Controller Tenant Mode or when you Use a SaaS Controller.
    (info) Skip this step if you are using single-tenant mode, which is the default in an on-premise installation.
  • Specify the properties for Account Name and Account Key. This information is provided in the Welcome email from the AppDynamics Support Team. You can also find this information in the <controller-install>/initial_account_access_info.txt file.

Configure using

Configure using
System Properties





Required only if your Controller is configured for multi-tenant mode or
your controller is hosted.




Required only if your Controller is configured for multi-tenant mode or
your controller is hosted.


5. Configure how the Java Agent identifies the AppDynamics business application, tier, and node

When configuring an Java Agent, you identify the business application, tier, and node it belongs to in the AppDynamics application model. See
Logical Model and Name Business Applications, Tiers, and Nodes for more information on this model.

You can configure these properties using either the controller-info.xml file or JVM startup script options. Use these guidelines when configuring agents:

  • Configure items that are common for all the nodes in the controller-info.xml file.
  • Configure information that is unique to a node in the startup script.

Configure using

Configure using
System Properties





Yes, unless you use automatic naming




Yes, unless you use automatic naming




Yes, unless you use automatic naming


Automatic Naming for Application, Tier, and Node

The Java Agent javaagent command accepts an argument named uniqueID that AppDynamics uses to automatically name the node and tier for this Java Agent. For example, using this command argument AppDynamics will name the node and tier "my-app-jvm1":


When uniqueID is used and the application name is not provided either through the system property or in the controller-info.xml, AppDynamics creates a new business application called "MyApp".

The naming mechanism is used by the Java Agent Download Wizard process. See Quick Install.

Additional Installation Scenarios

Refer to the links below for typical installation scenarios, especially for cases where there are multiple JVMs on the same machine:

6. Verify Java Agent configuration

  • Ensure that you have added -javaagent argument in your JVM startup script. This is not a -D system property but a different standard argument for all JVMs v1.5 and higher.
  • Ensure that you have added all mandatory items either in the Java Agent controller-info.xml file or in the JVM startup script file.
  • The user running the JVM process/application server process is the user accessing the Java Agent installation.

7. Verify successful installation and reporting

a. Verify Java Agent installation

After a successful install, your Java Agent logs, located at <agent_home>/logs, should contain following message:

Started AppDynamics Java Agent Successfully

(warning) If the agent log file is not present, the Java Agent may not be accessing the javaagent command properties. The application server log file where STDOUT is logged will have the fallback log messages, for further troubleshooting.

b. Verify that the Java Agent is reporting to the Controller

Use the AppDynamics UI, to verify that the Java Agent is able to connect to the Controller:

  • Point your browser to: http://<controller-host>:<controller-port>/controller
  • Provide the admin credentials to log into the AppDynamics UI.
  • Select the application. In the left navigation pane, click Servers -> App Servers -> <tier> -> <node>. Click the Agents tab and App Server Agent subtab. An agent successfully reporting to the Controller will be listed and the Reporting property shows an "up" arrow symbol. For more details see Verify App Agent-Controller Communication.
  • When deploying multiple agents for the same tier, see if you get the exact number of nodes reporting in the same tier.

Example Configuration: Java Agent Deployment on a Single JVM

The following example shows a sample deployment of the Java Agent for the ACME Bookstore.

  • Add the javaagent argument to the start-up script of the JVM:
java -javaagent:<install_dir_for_agent>/javaagent.jar
  • Define the five mandatory items for agent configuration in the  Java Agent controller-info.xml file:

Learn More