On this page:
Related pages:
You can configure the App Server Agent properties using:
- Settings in the controller-info.xml file
- System properties (-D options) passed to the JVM at start up
- Environment variables read at start up
To avoid conflicts, that agent follows the following order of precedence: environment variable, system properties, and then controller-info.xml file.
Using a Single Agent with Multiple JVMs
For shared binaries among multiple JVM instances, AppDynamics recommends using a combination of the XML file and the startup properties to configure the app agent. Configure all the properties common to all the JVMs in the controller-info.xml file. Configure the properties unique to a JVM using the system properties in the start-up script.
For example:
- For multiple JVMs belonging to the same application serving different tiers, configure the application name in the controller-info.xml file and the tier name and node name using the system properties.
- For multiple JVMs belonging to the same application and tier, configure the application name and tier name in the controller-info.xml file and the node name using the system properties.
After you configure agent properties, confirm that the javaagent argument has been added to the JVM startup script. For more information, see Java Server-Specific Installation Settings.
For some properties, you can use system properties already defined in the startup script as the Java Agent property values. For more information, see Use System Properties for Java Agent Settings.
Example Agent Configuration Using controller-info.xml
<?xml version="1.0" encoding="UTF-8"?> <controller-info> <controller-host>192.168.1.20</controller-host> <controller-port>8090</controller-port> <controller-ssl-enabled>false</controller-ssl-enabled> <application-name>ACMEOnline</application-name> <tier-name>InventoryTier</tier-name> <node-name>Inventory1</node-name> <agent-runtime-dir></agent-runtime-dir> <enable-orchestration>false</enable-orchestration> <account-name></account-name> <account-access-key></account-access-key> <force-agent-registration>false</force-agent-registration> </controller-info>
Note that comments have been removed for brevity.
Example Agent Configuration Using System Properties at the Command Line
The following command uses system properties passed when starting the monitored Java agent. The application is named ACMEOnline, the tier is named Inventory, and the node Inventory1. The name of the application file is SampleApplication. System property values are case-sensitive.
java -javaagent:/home/appdynamics/agent/javaagent.jar -Dappdynamics.controller.hostName=192.168.1.20 -Dappdynamics.controller.port=8090 -Dappdynamics.agent.applicationName=ACMEOnline -Dappdynamics.agent.tierName=Inventory -Dappdynamics.agent.nodeName=Inventory1 SampleApplication
Java Agent Properties
This section describes the Java Agent configuration properties, including their controller-info.xml elements and their system property options.
Agent-Controller Communication Properties
Controller Host Property
The host name or the IP address of the AppDynamics Controller. Example values are 192.168.1.22 or myhost or myhost.abc.com. This is the same host that you use to access the AppDynamics browser-based user interface. For an on-premise Controller, use the value for Application Server Host Name that was configured when the Controller was installed. If you are using the AppDynamics SaaS Controller service, see the Welcome email from AppDynamics.
Element in controller-info.xml: <controller-host>
System Property: -Dappdynamics.controller.hostName
Environment Variable: APPDYNAMICS_CONTROLLER_HOST_NAME
Type: String
Default: None
Required: Yes, if the Enable Orchestration property is false.
If Enable Orchestration is true, and if the app agent is deployed in a compute cloud instance created by an AppDynamics workflow, do not set the Controller host unless you want to override the auto-detected value. See Enable Orchestration Property.
Controller Port Property
The HTTP(S) port of the AppDynamics Controller. This is the port used to access the AppDynamics browser-based user interface.
If the Controller SSL Enabled property is set to true, specify the HTTPS port of the Controller; otherwise specify the HTTP port. See Controller SSL Enabled Property.
Element in controller-info.xml: <controller-port>
System Property: -Dappdynamics.controller.port
Environment Variable: APPDYNAMICS_CONTROLLER_PORT
Type: Positive Integer
Default: For On-premise installations, port 8090 for HTTP and port 8181 for HTTPS are the defaults.
For the SaaS Controller Service, port 80 for HTTP and port 443 for HTTPS are the defaults.
Required: Yes, if the Enable Orchestration property is false.
If Enable Orchestration is true, and if the app agent is deployed in a compute cloud instance created by an AppDynamics workflow, do not set the Controller port unless you want to override the auto-detected value. See Enable Orchestration Property.
SSL Configuration Properties
Controller SSL Enabled Property
If true, specifies that the agent should use SSL (HTTPS) to connect to the Controller. If SSL Enabled is true, set the Controller Port property to the HTTPS port of the Controller. See Controller Port Property.
Element in controller-info.xml: <controller-ssl-enabled>
System Property: -Dappdynamics.controller.ssl.enabled
Environment Variable: APPDYNAMICS_CONTROLLER_SSL_ENABLED
Type: Boolean
Default: False
Required: No
Controller Keystore Password Property
The encrypted value of the Controller certificate password. See Password Encryption Utility.
Element in controller-info.xml: <controller-keystore-password>
System Property: Not applicable
Type: String
Default: None
Required: No
Controller Keystore Filename Property
By default, the agent looks for a Java truststore file named cacerts.jks in the conf
directory in the agent home. Use this property to enable full validation of Controller SSL certificates with a different Java truststore file. See Enable SSL for Java.
Element in controller-info.xml: <controller-keystore-filename>
System Property: Not applicable
Type: String
Default: None
Required: No
Force Default SSL Certificate Validation Property
Used to override the default behavior for SSL validation. The property can have three states:
- true: Forces the agent to perform full validation of the certificate sent by the controller, enabling the agent to enforce the SSL trust chain. Use this setting when a public certificate authority(CA) signs your Controller SSL certificate. See Enable SSL On-Premise with a Trusted CA Signed Certificate.
- false: Forces the agent to perform minimal validation of the certificate. This property disables full validation of the Controller's SSL certificate. Use this setting when full validation of a SaaS certificate fails.
- unspecified: The validation performed by the agent depends on the context:
- If the agent is connecting to a SaaS controller, full validation is performed.
- If the agent is connecting to an on-premise controller, and the cacerts.jks file is present, then full validation is performed using the cacerts.jks file.
- If the agent is connecting to an on-premise controller, and there is no cacerts.jks file, then minimal validation is performed
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.force.default.ssl.certificate.validation
Type: Boolean
Default: None
Required: No
Agent Identification Properties
Automatic Naming Property
If enabled and other agent identification properties are not specified in other settings, the tier and application for the agent are automatically named. The default names are in the format MyApp and MyTier.
Element in controller-info.xml: <auto-naming>
System Property: Not applicable
Type: Boolean
Default: None
Required: No
Application Name Property
The name of the logical business application that this JVM node belongs to. Note that this is not the deployment name(ear/war/jar) on the application server.
If a business application of the configured name does not exist, it is created automatically.
Element in controller-info.xml: <application-name>
System Property: -Dappdynamics.agent.applicationName
Environment Variable: APPDYNAMICS_AGENT_APPLICATION_NAME
Type: String
Default: None
Required: Yes
Tier Name Property
The name of the tier that this JVM node belongs to. Note that this is not the deployment name (ear/war/jar) on the application server.
If the JVM or application server startup script already has a system property that references a tier, such as -Dserver.tier, you can use ${server.tier} as the tier name. For more information, see Use System Properties for Java Agent Settings.
The agent registers the named tier with the Controller, if the tier does not already exist, the first time it connects with the Controller. If a tier with the name already exists in the Controller model, the agent is associated with the existing tier.
See Name Business Applications, Tiers, and Nodes.
Element in controller-info.xml: <tier-name>
System Property: -Dappdynamics.agent.tierName
Environment Variable: APPDYNAMICS_AGENT_TIER_NAME
Type: String
Default: None
Required: Yes
Node Name Property
The name of the node. Where JVMs are dynamically created, use the system property to set the node name.
If your JVM or application server startup script already has a system property that can be used as a node name, such as -Dserver.name, you could use ${server.name} as the node name. You could also use expressions such as ${server.name}_${host.name}.MyNode to define the node name. See Use System Properties for Java Agent Settings for more information.
In general, the node name must be unique within the business application and physical host. If you want to use the same node name for multiple nodes on the same physical machine, create multiple virtual hosts using the Unique Host ID property. See Unique Host ID Property.
See Name Business Applications, Tiers, and Nodes.
Element in controller-info.xml: <node-name>
System Property: -Dappdynamics.agent.nodeName
Environment Variable: APPDYNAMICS_AGENT_NODE_NAME
Type: String
Default: None
Required: Yes
New
Reuse Node Name Property
Set this property to true to reuse node names in AppDynamics. When you set the property to true, you don't need to supply a node name, but you do need to provide a node name prefix using -Dappdynamics.agent.reuse.nodeName.prefix
.
This property is useful for monitoring environments where there are many JVMs with short life spans. When true, AppDynamics reuses the node names of historical JVMs for new JVMs. This avoids a proliferation of differently named nodes in AppDynamics over time, particularly when the nodes are essentially identical processes that run over different times. An example of this environment is a z/OS Dynamic Workload Manager based-environment where new JVMs are launched and shut down based on actual work load.
AppDynamics generates a node name with App, Tier and Sequence number. The node names are pooled. For example, the sequence numbers are reused when the nodes are purged (based on the node lifetime).
The node name is generated by the Controller. The Controller reuses node names based on the node retention period property.
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.agent.reuse.nodeName
Type: Boolean
Default: False
Required: No
Example: With the following configuration, the Controller generates a node name with the prefix "reportGen". Node names will have suffixes --1, --2, and so on, depending on the number of nodes are running in parallel. The name of a node that is shut down and qualifies as a historical node may be reused by a new node.
-Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=reportGen
Reuse Node Name Prefix Property
When you configure the agent to reuse node names, use this property to specify the prefix the Controller uses to generate node names dynamically.
System Property: -Dappdynamics.agent.reuse.nodeName.prefix
Element in controller-info.xml: Not applicable
Type: String
Default: None
Required: When -Dappdynamics.agent.reuse.nodeName=true
Example: Using the following property specifications, the agent directs the Controller to generate a node name with the prefix "reportGen". Node names will have suffixes --1, --2, and so on, depending on how many nodes are running in parallel.
-Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=reportGen
Multi-Tenant Mode Properties
If the AppDynamics Controller is running in multi-tenant mode or if you are using the AppDynamics SaaS Controller, specify the account name and account access key for this agent to authenticate with the Controller. If you are using the AppDynamics SaaS Controller, the account name is provided in the Welcome email sent by AppDynamics. You can also find this information in the <controller_home>/initial_account_access_info.txt file.
If the Controller is running in single-tenant mode (the case for most on-premise installations), there is no need to configure these values.
Account Name Property
Description: This is the account name used to authenticate with the Controller.
Element in controller-info.xml: <account-name>
System Properties: -Dappdynamics.agent.accountName
Environment Variable: APPDYNAMICS_AGENT_ACCOUNT_NAME
Type: String
Default: None
Required: Yes for AppDynamics SaaS Controller and other multi-tenant users; no for single-tenant users.
Account Access Key Property
The account access key used to authenticate with the Controller.
Element in controller-info.xml: <account-access-key>
System Properties: -Dappdynamics.agent.accountAccessKey
Environment Variable: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY
Type: String
Default: None
Required: Yes for AppDynamics SaaS Controller and other multi-tenant users; no for single-tenant users.
Proxy Properties for the Controller
These properties configure the agent to connect to the Controller through a proxy.
Proxy Host Property
The proxy host name or IP address.
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.http.proxyHost
Type: String
Default: None
Required: No
Proxy Port Property
The proxy HTTP(S) port.
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.http.proxyPort
Type: Positive Integer
Default: None
Required: No
Proxy User Name Property
The name of the user that is authenticated by the proxy host.
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.http.proxyUser
Type: String
Default: None
Required: No
Proxy Password Property
The absolute path to the file containing the password of the user that is authenticated by the proxy host. The password must be the first line of the file and must be in clear (unencrypted) text.
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.http.proxyPasswordFile
Type: String
Default: None
Required: No
Example: -Dappdynamics.http.proxyPasswordFile=/path/to/file-with-password
Other Properties
Enable Orchestration Property
When set to true, enables auto-detection of the controller host and port when the app server is a compute cloud instance created by an AppDynamics orchestration workflow. See Controller Host Property and Controller Port Property.
In a cloud compute environment, auto-detection is necessary for the Create Machine tasks in the workflow to run correctly.
If the host machine on which this agent resides is not created through AppDynamics workflow orchestration, this property should be set to false.
Element in controller-info.xml: <enable-orchestration>
System Property: Not applicable
Type: Boolean
Default: False
Required: No
Agent Runtime Directory Property
Sets the runtime directory for all runtime files (logs, transaction configuration) for nodes that use this agent installation. If this property is specified, all agent logs are written to <Agent-Runtime-Directory>/logs/node-name and transaction configuration is written to the <Agent-Runtime-Directory>/conf/node-name directory.
Element in controller-info.xml: <agent-runtime-dir>
System Property: -Dappdynamics.agent.runtime.dir
Environment Variable: APPDYNAMICS_AGENT_BASE_DIR
Type: String
Default: <agent_home>/nodes
Required: No
Redirect Log Files Property
Sets the destination directory to which to redirect log files for a node.
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.agent.logs.dir
Type: String
Default: <agent_home>/logs/<Node_Name>
Required: No
Force Agent Registration Property
Set to true only under the following conditions:
- The Agent has been moved to a new application and/or tier from the UI
and - You want to override that move by specifying a new application name and/or tier name in the agent configuration.
Element in controller-info.xml: <force-agent-registration>
System Property: Not applicable
Type: Boolean
Default: False
Required: No
Auto Node Name Prefix Property
Set this property if you want the Controller to generate node names automatically using a prefix that you provide.
The Controller generates node names based on the prefix concatenated with a number, which a suffix consisting of a number that is incremented sequentially with each new node. For example, if you assign a value of "mynode" to this property, the Controller generates node names "mynode-1", "mynode-2" and so on.
This property provides a similar function to the Reuse Node Name Prefix Property property. However, this property is not meant to be used in combination with reusing node names; use Reuse Node Name Prefix Property for those cases instead.
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.agent.auto.node.prefix=<your_prefix>
Type: String
Default: Serial number maintained by the Controller appended to the tier name
Required: No
Cron/Batch JVM Property
Set this property to true if the JVM is a batch/cron process or if you are instrumenting the main() method. This property can be used to stall the shutdown to allow the agent to send metrics before shutdown.
Element in controller-info.xml: Not applicable
System Property: -Dappdynamics.cron.vm
Type: Boolean
Default: False
Required: No
Unique Host ID Property
Logically partitions a single physical host or virtual machine such that it appears to the Controller that the application is running on different machines. Set the value to a string that is unique across the entire managed infrastructure. The string may not contain any spaces. If this property is set on the app agent, it must be set on the machine agent as well.
See Configure Multiple Standalone Machine Agents for One Machine for Java.
System Property: -Dappdynamics.agent.uniqueHostId
Environment Variable: APPDYNAMICS_AGENT_UNIQUE_HOST_ID
Type: String
Default: None
Required: No
Hot Spot Learning on Controller
Enables or disables hotspot learning on the Controller. Prior to 3.9, hot spot learning was performed by the App Agent for Java. To improve performance and more accurately collect snapshot information, this functionality was moved to the Controller in 3.9. Setting this option to false will disable everything related to this new feature. For more information on hotspots, see Transaction Snapshots and Call Graphs.
System Property: -Dappdynamics.hotspot.learn.enabled
Type: String
Default: true
Required: No