This page applies to an earlier version of the AppDynamics App IQ Platform.
See the latest version of the documentation.

Skip to end of metadata
Go to start of metadata

On this page:

Related pages:


Search the Instrument Java Applications topics:

To monitor Java applications in the Controller, you need to install the AppDynamics Java Agent on each server that hosts applications to be monitored. You then add the Java Agent binary to the Java application process, typically by passing the agent JAR file as a startup argument to the application.

The following steps provide an overview of how to install the Java Agent using the Agent Download Wizard in the Controller. If you downloaded the agent from the AppDynamics Download Center, see Install the Java Agent.

Before You Begin

  1. Verify support for your application environment at Java Supported Environments.
  2. Confirm you have access to a compatible controller. See Agent - Controller Compatibility Matrix.
  3. Confirm the connection settings to the Controller where your agent will report data:
    • For a SaaS controller, AppDynamics sent you the Controller host in your Welcome Email. Use port 443 for HTTPS or port 80 for HTTP.
    • For an on-premise controller, the host and port for the Controller are configured at installation time.
  4. Verify you have access the machine where the application runs as a user account with privileges to install the agent software and restart the application.
  5. Verify that the machine where the application runs can connect to the Controller. Proxies or firewalls on the network between the agent and Controller may require additional configuration.   

Java Agent Resource Overhead

While relatively lightweight, the Java Agent does add a certain amount of overhead to the overall resource consumption of an application. The existing resource allocation for most applications can absorb the additional overhead imposed by the agent, so you do not normally need to increase the resource allocation for the application when installing the agent. 

However, the exact CPU or memory overhead added by the agent can vary depending upon your application and how you have configured AppDynamics.

If your application operates within a small margin of its existing memory resource allocation, you may choose to increase the allocation for the application. AppDynamics recommends allocating the following amounts of additional Heap and PermGen space to accommodate the agent:

  • Maximum heap size (-Xmx): 100 MB in addition to the amount required by the application
  • Maximum PermGen (permanent generation) heap size (-XX:MaxPermSize): 20 MB in addition to the amount required by the application 

In terms of CPU consumption, the agent can add between 0% to 2% additional overhead on CPU usage. 

Certain resource-intensive AppDynamics features, such as asynchronous transaction tracking, can increase resource consumption as well. AppDynamics recommends that you monitor the memory consumption of your application to ensure that there are sufficient resource allocated to it.  

For network bandwidth consumption, see Install and Administer Agents.  

Configure and Download the Java Agent

The Agent Download Wizard takes you through the steps for configuring and downloading the Java Agent. 

The wizard takes you through a slightly different flow for a self-service trial edition of the Controller versus a non-trial edition:  

  • For the self-service Pro Trial edition of AppDynamics Pro, AppDynamics automatically generates the application and tier names for you to help you get started quickly. You can always change these values later. See the following section for the automatic-naming format. 
  • For a non-trial edition, use the wizard to configure the application and the tier. The wizard automatically generates the node name.

For more information on Applications, Tiers, and Nodes, see Model the Application Environment

Each monitored JVM must have a unique combination of tier and node name in AppDynamics. This means that you need to run the wizard for each JVM to monitor, or, after downloading the agent, edit the configuration file that specifies the agent naming properties, controller-info.xml, to at least change the node name value before copying it to other machines. 

Automatic Naming with a Self-Service Pro Trial

If you are using a self-service trial edition of AppDynamics Pro, AppDynamics names your application, tier, and node dynamically. AppDynamics uses the following naming scheme to identify agents that do not otherwise identify themselves in controller-info.xml or using startup arguments to the JVM:  

  • Application name: MyApp
  • Tier name: MyTier
  • Node name: <app_server_type>@<hostname>:<port> (for example: JBoss@appserver1.example.com:8080)

The automatically generated node name includes the port number the server listens on to ensure that all instances of an application have unique node names in cases where multiple instances of an application server run on a single machine.  

If a server listens on multiple ports, automatic naming uses the lowest numbered port in the node name. For example, if a server uses port 8080 as a primary HTTP port but listens for shutdown requests on port 8005, the node will be named with the 8005 port.

For tiers, the Controller automatically recognizes distinct logical tiers based on traffic flow between the nodes and associates the nodes to individual tiers accordingly. All tiers belong to a single business application, MyApp. 

Download and Install the Agent in the JVM

After you download the agent, install it to your app server. The final window of the Agent Download Wizard includes brief instructions for installing the agent.

  1. Log on as an administrator to the machine running your Java application. Unzip the AppServerAgent.zip file.
    For example, on Linux unzip the agent to home/appdynamics. This is the <agent_home> directory.

    unzip AppServerAgent.zip -d /opt/appdynamics/appagent
  2. Edit your startup configuration file to include the Java Agent. 

     Show more information on startup scripts...

View Application Activity in the Controller

Now you're ready to restart your application and view data in the Controller UI:

  1. Restart the JVM.
  2. Apply load to your application.
  3. Log on to the Controller to see your application in action. 

The agent instruments the application code and reports metrics back to the Controller.

From here, you can install more agents or you can begin monitoring your application environment.

Watch the Video

For full-screen viewing, click Getting Started: AppDynamics for Java.