Smart Agent is bundled with the smartagentctl
binary that is used for installing Smart Agent.
This binary can be used for installing Machine Agent. Although the Smart Agent Command Line Utility can also be used for installing Machine Agent, choosing smartagentctl
simplifies the process by eliminating the library dependencies.
You can install Machine Agent from any of the following download sources:
- Splunk AppDynamics Download Portal
- The custom HTTP host
- Your local host machine
The zip file should be available in the Smart Agent directory.
You can use smartagentctl to install Machine Agent on any of the following host machines:
Supported Platforms
You can use smartagentctl
to install Machine Agent on any Linux machine that is compatible with the agent.
Install Machine Agent on the Smart Agent host
Perform the following steps to install Machine Agent on the same host as the Smart Agent:
- Verify if the Smart Agent configuration file includes the Controller details. The Machine Agent will use the same Controller details. See Configure Smart Agent.
This is required becausecontroller-info.xml
file located in the<machine_agent_home>/conf
directory is updated based on the Controller details mentioned in the Smart Agentconfig.ini
file. - Run the following command to install Machine Agent:
- (If using the download portal) Run the following command:
sudo ./smartagentctl install machine
- (If using the local directory) Download the Machine Agent zip file from the Downloads portal to the current Smart Agent directory, and then run the following command:
sudo ./smartagentctl install machine --install-agent-from: <path>/machine-agent.zip —download-protocol: local
- (If using custom HTTP server) Run the following command
sudo ./smartagentctl install machine --install-agent-from https://url-path/agent.zip --download-protocol http
- (If using the download portal) Run the following command:
Install Machine Agent on a Remote Host
Machine Agent can be installed as a service or as a process. When you install it as a process, the process does not restart automatically as it happens when installed as a service.
Run Machine Agent as a Service on Remote Host
To install Machine Agent on a remote host or multiple hosts you require to have a hosts.yaml
file that includes the host details where you need to install Machine Agent. These parameters are required for the YAML file:
Parameters | Description |
---|---|
batch_size | If you require to install Machine Agent on multiple remote hosts, you can install it in batches instead of installing all simultaneously. The value for this parameter must be a positive integer. For example |
name | Any name to identify your remote host. |
port | The SSH port for the direct communication of primary and remote hosts. The proxy configuration is not supported for the SSH connection. The default value is |
username | Any username that has write permission on the remote directory. If user is |
private_key_path | The path to the private key. |
temp_folder_path | The temporary folder path of the primary host. |
remote_dir | The path to the remote host directory |
This is a sample hosts.yaml:
batch_size: 5 hosts: - name: "host1" host: "localhost" port: 22 username: "root" private_key_path: "/Users/abc/.ssh/id_rsa" temp_folder_path: "/tmp" remote_dir: "/opt/appdynamics/smartagent" - name: "host2" host: "localhost" port: 22 username: "ubuntu" private_key_path: "/Users/abc/.ssh/id_rsa" temp_folder_path: "/tmp" remote_dir: "/opt/appdynamics/smartagent" ---
Perform the following steps to install Machine Agent on a remote host:
- Verify if machine.zip is available in the Smart Agent directory. If it is unavailable, ensure that the zip file is included in the Smart Agent directory.
- Install Machine Agent on the remote host based on the source.
- (If using the download portal) Run the following command:
sudo ./smartagentctl install machine --service --remote
- (If using the local directory) Download the Machine Agent zip file from the Downloads portal to the current Smart Agent directory, and then run the following command:
sudo ./smartagentctl install machine --service --remote --install-agent-from: <path>/machine-agent.zip —download-protocol: local
- (If using custom HTTP server) Run the following command
sudo ./smartagentctl install machine --service --remote --install-agent-from https://url-path/agent.zip --download-protocol http
- (If using the download portal) Run the following command:
Run Machine Agent as a Process on Remote Host
Smart Agent automatically discovers the Machine Agent process that is running on the same host as the Smart Agent. See Auto Discovery of Application Process.
To monitor the process using Smart Agent, you must ensure the following:
- Smart Agent is active. To manage the lifecycle of Machine Agent process, the Smart Agent must be running in the host.
- You do not delete or modify the
.process.json file
. All the Information related to Machine Agent is captured in the.process.json
file in the existing Smart Agent directory.