You can install Smart Agent on the host machines by logging in to each machine. You can download the respective files from the Download Portal to the required host machine.
Note:
-
Smart Agent is bundled with the smartagentctl binary that simplifies the installation.
-
The smartagentctl binary can be used for installing Smart Agent on multiple remote hosts. This binary does not have any library dependencies.
Perform the following steps to install Smart Agent on the Linux or Windows host machine. You can use powershell to run the commands on Windows host.
- Download the Smart Agent ZIP file from the Download Portal to any location on the required host machine.
unzip -d appdsmartagent appdsmartagent-<version>.zip
- Open the
config.ini file in a text editor and replace the placeholder values with the actual access key and the service URL to which you require to connect.
This information is required for Smart Agent to communicate with the intended service. For the description of each configuration option, see
Configure Smart Agent.
For Linux:
$ cd appdsmartagent
$ vim config.ini
For Windows:
$ cd appdsmartagent
$ notepad config.ini
- Install and start Smart Agent by using
smartagentctl.
Ensure that you navigate to the directory that includes
smartagentctl , then run it with the required variables and parameters. See
Variables and
Install Parameters.
For Linux:
sudo ./smartagentctl start --enable-auto-attach --service --user <user> --group <group>
Note:
-
Sudo is required to run Smart Agent as a service.
-
If there are any issues with LD_PRELOAD, run the command from a new session.
- This command with or without the
--enable-auto-attach parameter, sets the APPD_SMART_AGENTenvironment variable. This is required for the Controller to correlate with the Smart Agent in the Agent Management UI. The supported AppServer agents parse the variable and send the Smart Agent ID to the Controller.
For Windows:
./smartagentctl.exe start
Note: Btluafed ySmart Agent runs as a service by default on Windows and does not require the B--service parameter.
- (Optional) If you need to install Smart Agent on a single or multiple remote hosts, perform the following:
Note: Proxy configuration is not supported for the SSH connection.
- (Only for Linux) Create a user with write permission on the remote directory. If the user already exists, ensure that the user owns the remote directory.
For example, if the username is
ubuntu and you require to install Smart Agent at
/opt/appdynamics on the remote machine, then ensure that
/opt/appdynamics is created on the remote machine and the
ubuntu user owns it. Run the following command to add the ownership:
sudo chown ubuntu:ubuntu /opt/appdynamics/smartagent/
If you use existing user, ensure that the user has write permission. Run the following to verify the permissions:
ls -ld /opt/appdynamics/smartagent to check the user permissions.
- (For Linux or Windows) Create the
remote.yaml file in the current Smart Agent directory.
This is a sample remote.yaml file for Linux:
batch_size: 5 # This ensures that the installation is done in batches instead of installing the agent on all the hosts simultaneously.
hosts:
- name: "host1" # the name for the remote host
host: "localhost" # the hostname of the primary host
port: 22 # the default SSH port for the direct communication of primary and remote hosts
username: "ubuntu"
private_key_path: "<path-to-private-key>"
temp_folder_path: "/tmp" # the temporary folder path of the primary host
remote_dir: "/opt/appdynamics/smartagent" # path to the remote host directory
- name: "host2"
host: "localhost"
port: 22 #default SSH port
user: "appd-user"
group: "appd-group"
username: "ec2-user"
private_key_path: "/Users/abc123/.ssh/id_rsa"
temp_folder_path: "/tmp"
remote_dir: "/opt/appdynamics/smartagent"
---
Here, username is the user who has the permission to perform SSH connection to the remote host using the private key. User and group specifies what permission will be used to run the process.
For example, if the username is ubuntu and you require to install Smart Agent at /opt/appdynamics/smartagent on the remote machine, then ensure that /opt/appdynamics is created and the ubuntu user owns it. Use sudo chown ubuntu:ubuntu /opt/appdynamics/smartagent/ to add the ownership.
You can use ls -ld /opt/appdynamics/smartagent to check the user permissions.
This is a sample
remote.yaml file for Windows:
protocol:
type: winrm
auth:
type: certificate
cert_path: /path/to/cert.pem
key_path: /path/to/key.pem
hosts:
- host: host1.localhost
remote_dir: /dir1/dir
protocol:
type: winrm
auth:
type: certificate
cert_path: host-cert.pem
key_path: host-key.pem
- host: host2.localhost
protocol:
type: winrm
use_plain_text: true
auth:
type: basic
username: testuser
password: testpassword
For details about the parameters, see サポート対象エージェントをリモートホストにインストールするための要件.
- Run the following command to start Smart Agent on the remote host:
For Linux:
sudo ./smartagentctl start --enable-auto-attach --service --remote
For Windows:
./smartagentctl.exe start --remote
- To validate the installation, see スマートエージェントのインストールの検証 .
To install Smart Agent on multiple hosts, see複数ノードでのスマートエージェントのインストールの自動化