You can deploy the Machine Agent on multiple hosts from one central directory. This setup can make it much easier to update the agent because each agent instance starts from one set of executables in one central location.

Workflow Description

The following steps describe the workflow:

  1. Set up the central agent directory:
    1. Install the Machine Agent executables and config files in a central directory, such as an NFS-mounted shared directory
    2. Specify properties common to all remote agents in this central directory. 
  2. Configure each remote host to start an instance of the agent from this central directory:
    1. Specify properties that are unique to the agent on that host, either in a startup script or on the command line. 
    2. Configure a startup script to start an instance of the machine agent from the central agent directory.

Set up the Central Agent Directory

  1. Download the latest Machine Agent ZIP file. For more information, see Download AppDynamics Software
  2. Unzip the downloaded file to the desired root directory (<central-agent-root-directory>) on the central host.
  3. Specify the properties common to all Machine Agent instances running on all remote hosts. Examples of common properties include the account name and the Controller host and port. You specify these properties in <central-agent-root-directory>/conf/controller-info.xml.  

Configure Each Remote Host to Start an Agent Instance

On each Machine Agent host, specify the properties unique to that agent such as the runtime directory, application name, tier name, and node name. To specify these properties, configure -D parameters in the startup script or on the command line. For example, the startup script on a remote host might include the following command:

<central_agent_root_directory>/bin/machine-agent -Dappdynamics.agent.runtime.dir=<agent_runtime_dir>  -Dappdynamics.agent.applicationName=<application_name>

It is good practice to specify a unique runtime directory for each remote host, to ensure that log files for each agent instance get saved to a separate directory. The agent log directory is located under the agent runtime directory, which is specified using the -Dappdynamics.agent.runtime.dir system property. The log directory is directly under the runtime directory (<agent-runtime-dir>/logs). Note the following: 

  • You should specify the runtime directory as an absolute path in the startup script on the remote host, like this: 

  • To change the log directory and file name from logs/machine-agent.log (the default), edit the file <machine-agent-home>/confs/logging/log4.xml. Then change the value of the "FileAppender" > "File" parameter to the desired directory and file name. 
  • The file-system permissions must allow creation of the log directory and file. If a failure occurs trying to create the log file, the Machine Agent uses the default file (<central-agent-root-directory>/logs/machine-agent.log), logs the error and continues.