On this page:
Search Java Agent 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.
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 Zone, see Install the Java Agent.
Before You Begin
- Verify support for your application environment at Java Supported Environments.
- Confirm you have access to a compatible controller. See Agent and Controller Compatibility.
- 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-premises controller, the host and port for the Controller are configured at installation time.
- 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.
- 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.
Watch the Video
For full-screen viewing, click Start Monitoring Java Applications.
Java Agent Resource Overhead
The Java Agent typically adds between 0% to 2% additional CPU consumption.
However, certain factors can increase CPU overhead from the agent beyond 2%. These include the use of resource-intensive AppDynamics features, such as asynchronous transaction tracking. Very active environments or configuration settings that result in a high number of metrics or snapshots reported per minute can also affect agent resource consumption.
In all cases, AppDynamics recommends that you test the agent in a staging environment, and monitor resource consumption of your application to ensure that it remains within proper operating parameters.
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
For network bandwidth consumption, see Administer App Server Agents.
Application Modeling with the Java Agent
The Agent Download Wizard takes you through the steps for configuring and downloading the Java Agent.
Each monitored JVM must have a unique combination of tier and node name in AppDynamics. Naming the components in the wizard varies between the self-service trial edition of AppDynamics and the non-trial edition:
- For the self-service Pro Trial edition of AppDynamics Pro, the wizard names the application and tier for you using the format described in the following section. You can always change the names later..
- For a non-trial edition, you name the application and tier in the wizard, while the wizard generates the node name.
For self-service trials of AppDynamics Pro, the getting started wizard uses the following naming scheme to identify agents:
- Node name: <app_server_type>@<hostname>:<port> (for example: JBoss@appserver1.example.com:8080)
- Tier name: MyTier
- Application name: MyApp
The port number in the node name ensures that each node has a unique name if there is more than one app server on the same machine.
If the application server listens on multiple ports, the node name uses the lowest of the port numbers. Notice that the lowest port number may not be the primary port for the host. For instance, if a server listens for client requests at 8080 but listens for shutdown requests on port 8005, the node will be named with the 8005 port.
The Controller identifies distinct tiers based on traffic flow between nodes. All tiers belong to a single business application, MyApp.
Install the Agent
After you download the agent, install it to your app server as described in the final step of the Agent Download Wizard:
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.
Add the Java Agent binary to the application process, typically by passing the agent JAR file as a startup argument to the application. For information by framework and application type, see the following pages:Show more information on startup scripts...
When done, you're ready to restart your application and view data reported by the agent in the Controller UI. From there, you can install more agents or you can begin monitoring your application environment.