On this page:
As an alternative to using system properties or controller-info.xml to configure the application name, tier name, and node name, or other agent settings, you can use so on, you can configure the agent based on environment variables. Environment variables give you an additional option another mechanism for configuring the agent based on dynamically set values.
About Environment Variables
To configure the agent with environment variables, simply set the value of the appropriate environment variables listed below to the value you want to use in the agent.For example, if you set the value of the APPDYNAMICSvariable in the environment in which the monitored application runs.
There are environment variables defined for most of the agent settings you can configure in the controller-info.xml file. For example, there are variables for the application name, node name, Controller connection settings, and more.
To set the node name for the agent using an environment variable, set the value of the APPDYNAMICS_AGENT_NODE_NAME environment variable , as below, the agent automatically takes the value of node23 as its node name.as you normally would for the operating system you are using and restart the JVM.
For example, to set the variable from the Linux command line, enter this command:
When settings are configured in different. Environment variable, system property and then controller-info.xml. The agent checks each for settings, and for a particular settings, uses the setting for the first of these (given the order of priority) that is not empty.
List of Variables
The following environment properties can be used today to configure the agent.
the agent subsequently starts up, it takes node23 as its node name.
Environment Variables Used by the Agent
The Java Agent takes configuration settings from the following environment variables, when set:
|Environment Variable||Equivalent property|
|Unique host name|
The following example would be resolved to a tierName=tier1 and a nodeName=node32
export APPDYNAMICS_AGENT_NODE_NAME=node23 java -Dmytier.name=tier1 -Dappdynamics.agent.tierName=$mytier.name
Related product doc links
For app and machine agent config properties
Q: What is the order of precedence of system properties, environment variables, and controller-info.xml.
Q: What happens if the settings conflict?
A: The order is followed and the first one that is non-empty is picked up.
Q: The above list covers many, but not all, of the system properties that are in the product docs. Is there one environment variable that corresponds to every property?
A: These are all the environment variables that we support.
Q: Are there additional environment variables to document that do not have corresponding properties?
Any Dev Followups?
Notice that not all configurable agent settings are configurable through environment variables. For those settings, you need to use system properties or controller-info.xml, as described on Java Agent Configuration Properties.