Smart Agent is bundled with the smartagentctl binary that is used for installing Smart Agent. 

This binary can be used for installing all the supported agents Supported Agents for Smart Agent. We recommend that you use this binary to install the agents because it simplifies the process by eliminating the library dependencies.

You can install the agents 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 the agents on any of the following host machines:

Supported Platforms

You can use smartagentctl to install agents on any of the following platforms:

  • Windows 
  • Linux

Before starting the installation process, ensure that the agents are supported on the platform and the related versions See Supported Platforms.

The supported agents 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. 

Supported Agent Types

These are the supported agent types that are used during the installation process:

AgentAgent Type
Java               java
Machinemachine
Database                   db
.Net                   dotnet_msi
Apache            apache
Node.js                     node
PHP                    php
Pythonpython

Install the Supported Agent on the Smart Agent host

You can install the agents on any of the supported platforms.

Perform the following steps to install an agent on the same host as the Smart Agent:

  1. Verify if the agent is supported on a Linux or Windows machine. See Supported Platform.
  2. Verify if the Smart Agent configuration file includes the Controller details. The agents will use the same Controller details. See Configure Smart Agent.
    This is required because controller-info.xml file located in the <agent-type>_home>/conf directory is updated based on the Controller details mentioned in the Smart Agent config.ini file.
  3. Run the following command to install the agent:
    1. (If using the download portal) Run the following command:
      • For Linux:
        sudo ./smartagentctl install <agent-name>
        CODE
      • For Windows:
        ./smartagentctl.exe install <agent-name>
        CODE
    2. (If using the local directory) Download the agent zip file from the Downloads portal to the current Smart Agent directory, and then run the following command:

      • For Linux:
        sudo ./smartagentctl install <agent-name> --install-agent-from: <path>/<agent-type>.zip —download-protocol: local 
        CODE
      • For Windows:
        ./smartagentctl.exe install <agent-name> --install-agent-from: <path>/<agent-type>.zip —download-protocol: local
        CODE
    3. (If using custom HTTP server) Run the following command:
      • For Linux:
        sudo ./smartagentctl install <agent-name> --install-agent-from https://url-path/<agent-type>.zip --download-protocol http
        CODE
      • For Windows:
        ./smartagentctl.exe install <agent-name> --install-agent-from https://url-path/<agent-type>.zip --download-protocol http
        CODE

Install Supported Agents on a Remote Host

To install the supported agents on a remote host, you require to create the remote.yaml file and use the same commands that you used for the primary host with an additional --remote parameter. 

If you require to install the agent on any platform ensure that the primary host is running on the same platform.

The remote.yaml file enables you to specify:

  • details to connect to one or more remote servers.
  • the protocols to use. For Windows, it is WinRM and for Linux it is SSH.
  • authentication methods.
  • other operational parameters.

This file supports global configurations that apply to all hosts and specific configurations that apply to specific hosts. To override the global configuration or include specific configuration per host, use the host parameter in the remote.yamlfile.

The following parameters are required for the remote.yaml file:

For Linux

ParametersDescription
max_concurrency

Determines the maximum number of hosts that will be processed simultaneously. Default value is 4.

The value for this parameter must be a positive integer. For example, if you specify max_concurrency: 3, Smart Agent starts installing the first three specified hosts. If one of the hosts gets installed while the other two are still processing, Smart Agent starts processing the next host to ensure three hosts are processed simultaneously. 

remote_dir

The target directory on the remote host or hosts where operations such as, Smart Agent installation is performed. For example, /home/my-remote-user/appd/smartagent.

Protocol

The protocol to connect to remote hosts. This includes the following sub parameters:

  • type: The type of the protocol. Specify the connection protocol as ssh.
  • auth: The authentication specific settings required for SSH protocol. These settings can be included as the sub-parameters:

    • username: The username for SSH authentication. This can be any username that has write permission on the remote directory. 

      If user is ubuntu and want to install the supported agent on remote host at /opt/appdynamics/smartagent, ensure that the directory /opt/appdynamics is created and the ubuntu user owns it.

    • private_key_path: The path to the SSH private key file for authentication. For example, /Users/my-local-user/.ssh/private_key.
    • privileged: The option to get root access on the remote host. The value can be true or false. We recommend to specify the value as true.
      By default the value is false and runs the processes using the provided user privileges.
      If you specify the value as true, the user gets root privileges on the remote host to install system-wide services. 
    • known_hosts_path: The path to the SSH known_hosts file. This is used for host key verification. For example, /Users/my-local-user/.ssh/known_hosts.

    • ignore_host_key_validation: The option to ignore the SSH host key validation. By default the value is false and it is also the recommended value.

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 22.

hosts

The list of all the hosts. Each host includes the IP address or hostname of the remote server. You can also specify remote_dir and protocol within host parameter to override the values that are specified in the global remote_dir and global protocol respectively.

Sample remote.yaml for Linux:
max_concurrency: 4
remote_dir: "/opt/appdynamics/smartagent"
protocol:
  type: ssh
  auth:
    username: my-remote-user
    private_key_path: /Users/my-local-user/.ssh/private_key
    privileged: true # switch to false to install agent as a process with the specified user privileges.
    known_hosts_path: /Users/my-local-user/.ssh/known_hosts
hosts:
  - host: "host1"
    port: 22
    protocol:
      auth:
        username: my-remote-user
        private_key_path: /Users/my-local-user/.ssh/private_key
        remote_dir: "/opt/appdynamics/smartagent"
  - host: "localhost"
    port: 22
    protocol:
      auth:
        username: "ubuntu"
        private_key_path: "/Users/abc/.ssh/id_rsa"
    
---  
YAML

For Windows

ParametersDescription

max_concurrency

Determines the maximum number of hosts that will be processed concurrently. Default value is 4.

remote_dir

The target directory on the remote host or hosts where operations such as, Smart Agent installation is performed. For example, c:\users\administrator\appd\smartagent.

protocol

This includes the following sub parameters:

  • type: The type of the protocol. Specify the connection protocol as winrm.
  • root_ca_cert_path: The path to the TLS root CA certificate file. For example, root-ca.pem. This is used for self-signed certificates to establish the trust.

  • use_plain_text: The option to use HTTP or HTTPS. The value can be true or false. If the value is true, HTTP is used for unencrypted communication. By default the value is false, so HTTPS is used for secure communication.

  • tls_skip_verification: The option to skip the TLS certificate verification process. If the value is true, Smart Agent skips the TLS certificate verification process. By default the value is false to ensure secure communication.
  • auth: The authentication specific settings required for WinRM protocol. For the settings that can be included as the sub-parameters, see auth.

auth

This is a sub parameter of Protocol and can include the following sub-parameter to specify the authentication-specific settings:

type: The type of WinRM authentication method. The values can be certificate or basic.

  • For certificate, you require to specify the following parameters:

    • cert_path: The path to the client certificate. For example, winrm_client_cert.pem.

    • key_path: The path to the client certificate's private key file. 

  • For basic, you require to specify one of the following password settings along with the username:
    • username: The username for authentication.

    • password: The password for the specified username.

    • passwordEnv: The name of an environment variable that stores the password. For example, WINRM_PASSWORD.

       
port

The port number for the connection.

The default value is 5985 (HTTP) and 5986 (HTTPS).

hosts

The list of all the hosts. Each host includes the IP address or hostname of the remote server. You can also specify remote_dir and protocol within host parameter to override the values that are specified in the global remote_dir and global protocol respectively.

Sample remote.yaml for Windows:
max_concurrency: 4
remote_dir: c:\users\administrator\appd\smartagent
protocol:
  type: winrm 
  root_ca_cart_path: root-ca.pem
  auth:
    # basic authentication
    type: basic 
    username: Administrator
    # either password or passwordEnv is required
    password: password-here  # value defined here is used as the password
    passwordEnv: WINRM_PASSWORD  # name of an environment variable that contains the password

hosts:
  - host: 198.111.45.1
    protocol:
      auth:
        type: basic
        password: password1
    port: 5985 # optional, default is 5985 for http and 5986 for https
  - host: 198.111.45.2
    protocol:
      auth:
        type: basic
        password: password2
  - host: 198.111.45.3
    protocol:
      auth:
        type: basic
        password: password3
---  
YAML

Use the same installation commands with the --remote parameter to install supported agent on a remote host based on the source:

  1. (If using the download portal) Run the following command:
    • For Linux:
      sudo ./smartagentctl install <agent-type> --remote
      CODE
    • For Windows:
      ./smartagentctl.exe install <agent-type> --remote
      CODE
  2. (If using the local directory) Download the agent zip file from the Downloads portal to the current Smart Agent directory, and then run the following command:
    Ensure that the agent zip file is included in the Smart Agent directory.
    • For Linux:
      sudo ./smartagentctl install <agent-type> --remote --install-agent-from: <path>/<agent-type>.zip —download-protocol: local 
      CODE
      Here, path is the relative path of the existing Smart Agent directory.
      For example:
      If you have downloaded Machine Agent zip file at <smartagent>/agent/machine-agent.zip, specify the following:

      sudo ./smartagentctl install <agent-type> --remote --install-agent-from: agent/machine-agent.zip —download-protocol: local 
      CODE
      If you have downloaded Machine Agent zip file at <smartagent>/machine-agent.zip, specify the following:
      sudo ./smartagentctl install <agent-type> --remote --install-agent-from: machine-agent.zip —download-protocol: local
      CODE


    • For Windows:
      ./smartagentctl.exe install <agent-type> --remote --install-agent-from: <path>/<agent-type>.zip —download-protocol: local 
      CODE
  3. (If using custom HTTP server) Run the following command:
    • For Linux:

      sudo ./smartagentctl install <agent-name> --install-agent-from https://url-path/<agent-type>.zip --download-protocol http
      CODE
    • For Windows:

      ./smartagentctl.exe install <agent-type> --remote --install-agent-from https://url-path/agent.zip --download-protocol http
      CODE