AppDynamics provides flexibility for configuring the Machine Agent so that you can choose the best fit for your deployment environment. 

Not all options are available for all properties. See Machine Agent Configuration Properties for details.

How to Configure the Machine Agent Properties

You can configure the Machine Agent in the following ways:

  • Edit the controller-info.xml file located in the <machine_agent_home>/conf directory
  • Add agent system properties (-D<system_property>) section of the Machine Agent start-up script or on the command line
  • Use environment variables. To configure the agent with environment variables, set the value of the environment variable in the environment where the monitored application runs and restart the agent. Environment variables exist for most of the agent settings in the controller-info.xml file, but not all settings are configurable through environment variables. For those settings, you need to use system properties or controller-info.xml, as described in the Machine Agent Configuration Properties. 

Empty spaces and special characters are not allowed in either the full path to the Machine Agent home directory or in the directory name itself. If the Machine Agent doesn't startup, you might need to investigate if the path contains empty spaces or special characters. For example, the path /opt/appdynamics/machine agent is problematic, but the path/opt/appdynamics/machine-agent works correctly.

The JVM system properties and environment variables override the settings in the controller-info.xml file. The Machine Agent applies configurations from the following sources in order. The agent applies the first non-empty value for a configuration property. 

  1. Environment variables
  2. System properties passed in the start command for the JVM.
  3. Global configuration file: <machine-agent-home>/conf/controller-info.xml. 

For details for each OS environment and install package, see Where to Specify Machine Agent Configuration.

Example Configuration

Machine Agent controller-info.xml File

<?xml version="1.0" encoding="UTF-8"?>

    <!-- The following account-related parameter is necessary only for SaaS installations-->


 bash command-line example 

<machine_agent_home>/bin/machine-agent -Dappdynamics.controller.hostName= 
-Dappdynamics.controller.port=8090 -Dappdynamics.agent.accountAccessKey=165e65645-95c1-40e3-9576-6a1424de9625 -Dappdynamics.agent.uniqueHostId=your-host-id