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.
The following steps describe the workflow:
- Set up the central agent directory:
- Install the Machine Agent executables and config files in a central directory, such as an NFS-mounted shared directory
- Specify properties common to all remote agents in this central directory.
- Configure each remote host to start an instance of the agent from this central directory:
- Specify properties that are unique to the agent on that host, either in a startup script or on the command line.
- Configure a startup script to start an instance of the machine agent from the central agent directory.
Set up the Central Agent Directory
- Download the latest Machine Agent ZIP file. For more information, see Download AppDynamics Software.
- Unzip the downloaded file to the desired root directory (<
central-agent-root-directory>) on the central host.
- 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
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:
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
"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.