For the list of supported platforms, see Supported Platforms and for other Smart Agent requirements, see Smart Agent.

This document contains references to the AnsibleĀ® documentation. Splunk AppDynamics does not own any rights and assumes no responsibility for the accuracy or completeness of such third-party documentation.

Install Smart Agent

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.

Agent Management provides Smart Agent CLI that you may use to automate installation of Smart Agent on multiple hosts.

Run the following command to install Smart Agent on the host machine: 

  1. Download the Smart Agent zip file from the Download Portal to any location on the required host machine.
    unzip -d appdsmartagent appdsmartagent-<version>.zip
    CODE
  2. 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.
    $ cd appdsmartagent
    $ vim config.ini
    CODE

  3. Install and start Smart Agent by using smartagentctl.
    Ensure that you navigate to the directory that includes smartagentctl, then run it with the required parameters. See Install Parameters.
    sudo ./smartagentctl start --enable-auto-attach --service --user <user> --group <group>
    CODE

    Sudo is required to run Smart Agent as a service.

To install Smart Agent on multiple hosts, see Automate Smart Agent Installation on Multiple Nodes.

The following table provides the variable details:

Variable NameDescriptionRequiredDefault Value
userUser with which Smart Agent Process should run No
  • root
  • Administrator
groupGroup with which Smart Agent Process should run Noroot

Install Parameters

The following table provides the optional parameters that you can use:

ParametersDescription
--enable-auto-attachEnable the auto-attach feature. See Auto-attach Agents to Applications.
--userSpecify 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, --helpGet help for starting Smart Agent.
--service Install Smart Agent as a service.

Configure Smart Agent

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:

config.ini

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 
YML

Basic Configuration

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.

    • config.ini

      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 
      YML

Advanced Configuration

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.

Proxy Configuration

If you require to configure the proxy settings, specify the following fields under the TLSClientSetting section of the config.ini file.

ParameterDescriptionExample
AgentHTTPProxyspecify this parameter to use the HTTP proxy URL for Smart Agent.

http://localhost:3128

AgentHTTPSProxyspecify this parameter to use the HTTPS proxy URL for Smart Agent.https://myhost:8443
AgentNoProxyspecify this parameter if you do not require to use any proxy for the Smart Agent. The value can be true or falsefalse

The following example is for using the HTTP proxy for the Smart Agent.

[TLSClientSetting]
Insecure = false
AgentHTTPProxy  = http://localhost:3128
AgentHTTPSProxy =
AgentNoProxy    = 
CODE
TLS Configuration

If you require to configure the TLS certificate, specify the following fields under the TLSSetting section of the config.ini file.

ParameterDescriptionExample
CAFilespecify the path to the root certificate file. <cert file path>/ca.crt
CertFilespecify the path to the client certificate file.  <client cert file path>/clients .crt
KeyFilespecify the path to the client private key of the file. <private key file path>/private.key
Log Level Configuration

 You can specify the log level details in the Telemetry section. You can use any of the following log levels:

  • debug
  •  info
  • warn
  • error

Telemetry

ParametersDescription
LogLevelThe logging level such as info.
LogFileThe path to the log file.
ProfilingSpecify true to enable profiling.

The following example is for using the info log level:

[Telemetry]
LogLevel=info
LogFile=
Profiling=false 
CODE


Start Smart Agent 

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 systemd services. Run the following command to change the context, then restart the service:

sudo chcon -t bin_t <smartagent dir>/smartagent  
sudo systemctl restart smartagent
CODE



Start as Process

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>
CODE

To view other operations that you can perform, run the following command:

./smartagentctl --help 
CODE

Start as Service

To start the Smart Agent as a service, run the following command:

For Linux
$ sudo ./smartagentctl start --service
CODE

To stop the Smart Agent service, you can use the following command:

$ sudo ./smartagentctl stop
CODE
For Windows

The Smart Agent service starts when you run the \smartagentctl.exe file in an administrator command line interface:

.\smartagentctl.exe start --service
CODE

To view other operations that you can perform, run the following command:

.\smartagentctl.exe --help 
CODE

For example to stop Smart Agent, you can use the following command:

.\smartagentctl.exe stop
CODE

Validate Smart Agent Installation

Ensure that Smart Agent installation is successful by validating the following steps:

  1. Validate the status of Smart Agent service on the host machine.
  2. Validate the status of Smart Agent registration on the Controller UI.

Status of Smart Agent Service on the Host

For Linux, run the following command from the host machine to check the status of Smart Agent service:

Validate

$ [sudo] systemctl status smartagent.service

For Windows, navigate to Services to verify if the Appdsmartagent service is running.

Validate Status of the Smart Agent Registration on the UI

  1. Navigate to Home > Agent Management > Manage Agents > Smart Agents
  2. The smart agent entry for the host on which it is installed, gets displayed in the table.