For the list of supported platforms, see Supported Platforms; for other Smart Agent requirements, see Smart Agent.
This document contains references to the Ansible® documentation. |
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.
|
Run the following command to install Smart Agent on the host machine:
unzip -d appdsmartagent appdsmartagent-<version>.zip |
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.$ cd appdsmartagent $ vim config.ini |
smartagentctl
. smartagentctl
, then run it with the required parameters. See Install Parameters.sudo ./smartagentctl start --enable-auto-attach --service --user <user> --group <group> |
|
Proxy configuration is not supported for the SSH connection. |
ubuntu
and you require to install Smart Agent at /opt/appdynamics/smartagent
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/ |
ls -ld /opt/appdynamics/smartagent to check the user permissions. |
hosts.yaml
file in the current smart agent directory. hosts.yaml
file: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 username: "ec2-user" private_key_path: "/Users/ubuntu/.ssh/id_rsa" temp_folder_path: "/tmp" remote_dir: "/opt/appdynamics/smartagent" --- |
sudo ./smartagentctl start --enable-auto-attach --service --remote |
To install Smart Agent on multiple hosts, see Automate Smart Agent Installation on Multiple Nodes. |
The following table provides the variable details:
Variable Name | Description | Required | Default Value |
---|---|---|---|
user | User with which Smart Agent Process should run | No |
|
group | Group with which Smart Agent Process should run | No | root |
The following table provides the optional parameters that you can use:
Parameters | Description |
---|---|
--enable-auto-attach | Enable the auto-attach feature. See Auto-attach Agents to Applications. |
--user | Specify the Smart Agent Process username. The default value will be the current user. The value should be in string format. |
--group | Specify the Smart Agent Process group. The default is the current group. The value should be in string format. |
-h, --help | Get help for starting Smart Agent. |
--service | Install Smart Agent as a service. |
--tomcat-env-config | The Apache Tomcat environment file path. The value should be in string format. |
--remote | Specify this to initiate the installation of Smart Agent in remote host. The value is in boolean format. The default value is |
You require to configure Smart Agents to register with Controller. Edit the configuration file. For example, if you have downloaded the install files at /opt/appdynamics
, navigate to /opt/appdynamics/appdsmartagent/config.ini
file and specify the configurations as required.
This is an example of a config.ini
file:
ControllerURL = ControllerPort = 443 FMServicePort = 8030 AgentType = AccountAccessKey = AccountName = EnableSSL = true [CommonConfig] ServiceName = ServiceNamespace = RequestTimeoutSeconds = 0 AgentName = PollingIntervalInSec = [OAuth] OAuthID = OAuthSecret = AuthEndpoint = TenantID = Scopes = [HTTPClientSettings] Timeout = 0 [TLSClientSetting] Insecure = false AgentHTTPProxy = AgentHTTPSProxy = AgentNoProxy = [TLSSetting] CAFile = CertFile = KeyFile = MinVersion = TLS 1.2 MaxVersion = TLS 1.3 [AutoDiscovery] RunAutoDiscovery = false AutoInstall = false ExcludeLabels = process.cpu.usage,process.memory.usage ExcludeProcesses = ExcludeUsers = AutoDiscoveryTimeInterval = 4h [AnsibleConfig] ExtraVars = create_appdynamics_user=false,add_ansible_install_env_var=false,check_pkg_dependencies=false,download_script=py EnvVars = ANSIBLE_STDOUT_CALLBACK=appdynamics.agents.smartagent_callback Verbose = [Telemetry] LogLevel=info LogFile= Profiling=false |
The basic configuration is the required configuration to register Smart Agent with Controller. Ensure that you update the following parameters for the basic Smart Agent configuration:
ControllerURL
: The URL of the Controller on which you want to establish the connection with the Smart Agent.FMServicePort:
The port to which the Smart Agent connects to the FM service (Agent Management). It is 8030 for an on-premises Controller and 443 for a SaaS Controller. AccountAccessKey
: The account access key on the Controller.AccountName
: The account name on the Controller to which the Smart Agent will report.
EnableSSL
: SSL is enabled by default. To disable SSL, specify the value as false
.ControllerURL = ControllerPort = 443 FMServicePort = 8030 AgentType = AccountAccessKey = AccountName = EnableSSL = true [CommonConfig] ServiceName = ServiceNamespace = RequestTimeoutSeconds = 0 AgentName = PollingIntervalInSec = [OAuth] OAuthID = OAuthSecret = AuthEndpoint = TenantID = Scopes = [HTTPClientSettings] Timeout = 0 [TLSClientSetting] Insecure = false AgentHTTPProxy = AgentHTTPSProxy = AgentNoProxy = [TLSSetting] CAFile = CertFile = KeyFile = MinVersion = TLS 1.2 MaxVersion = TLS 1.3 [AutoDiscovery] RunAutoDiscovery = false AutoInstall = false ExcludeLabels = process.cpu.usage,process.memory.usage ExcludeProcesses = ExcludeUsers = AutoDiscoveryTimeInterval = 4h [AnsibleConfig] ExtraVars = create_appdynamics_user=false,add_ansible_install_env_var=false,check_pkg_dependencies=false,download_script=py EnvVars = ANSIBLE_STDOUT_CALLBACK=appdynamics.agents.smartagent_callback Verbose = [Telemetry] LogLevel=info LogFile= Profiling=false |
You can use the following configurations as per your requirement. These are not mandatory parameters. You can also include these configurations after Smart Agent installation, but ensure to restart Smart Agent to apply the configuration.
If you require to configure the proxy settings, specify the following fields under the TLSClientSetting section of the config.ini file.
Parameter | Description | Example |
---|---|---|
AgentHTTPProxy | specify the proxy URL for this parameter when you use an HTTP Controller. | localhost:3128 |
AgentHTTPSProxy | specify the proxy URL for this parameter when you use an HTTPS Controller. | myhost:8443 |
AgentNoProxy | specify true for this parameter when you do not require to use any proxy for the Smart Agent. The value can be true or false | false |
The following example is for using the HTTP proxy for the Smart Agent:
[TLSClientSetting] Insecure = false AgentHTTPProxy = localhost:3128 AgentHTTPSProxy = AgentNoProxy = |
If you require to configure the TLS certificate, specify the following fields under the TLSSetting
section of the config.ini
file.
Parameter | Description | Example |
---|---|---|
CAFile | specify the path to the root certificate file. | <cert file path>/ca.crt |
CertFile | specify the path to the client certificate file. | <client cert file path>/clients .crt |
KeyFile | specify the path to the client private key of the file. | <private key file path>/private.key |
You can specify the log level details in the Telemetry section. You can use any of the following log levels:
Telemetry
Parameters | Description |
---|---|
LogLevel | The logging level such as info. |
LogFile | The path to the log file. |
Profiling | Specify true to enable profiling. |
The following example is for using the info log level:
[Telemetry] LogLevel=info LogFile= Profiling=false |
Smart Agent can be managed as a system service or a process.
If SELinux is enabled, you require to use the SELinux context of the smartagent file that is applicable through
|
To restart Smart Agent for a remote host, run the following command:
sudo ./smartagentctl stop --remote sudo ./smartagentctl start --remote |
For Linux, you can start Smart Agent as a process without the sudo access.
For Windows, you require Administrator access to start Smart Agent. Therefore, you cannot start Smart Agent as a process in Windows.
To start the Smart Agent as a process, run the following command:
./smartagentctl start --user <username> --group <groupname> |
To view other operations that you can perform, run the following command:
./smartagentctl --help |
To start the Smart Agent as a service, run the following command:
$ sudo ./smartagentctl start --service |
To stop the Smart Agent service, you can use the following command:
$ sudo ./smartagentctl stop |
The Smart Agent service starts when you run the \smartagentctl.exe
file in an administrator command line interface:
.\smartagentctl.exe start --service |
To view other operations that you can perform, run the following command:
.\smartagentctl.exe --help |
For example to stop Smart Agent, you can use the following command:
.\smartagentctl.exe stop |
Ensure that Smart Agent installation is successful by validating the following steps:
For Linux, run the following command from the host machine to check the status of Smart Agent service:
$ [sudo] systemctl status smartagent.service |
For Windows, navigate to Services to verify if the Appdsmartagent service is running.
To ensure that the updates that are done in the Smart Agent gets updated in the remote host, perform the following:
sudo ./smartagentctl stop --remote |
sudo ./smartagentctl start --remote |