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.

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.

  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
  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 スマートエージェントの設定.

    For Linux:

    $ cd appdsmartagent
    $ vim config.ini
    For Windows:
    $ cd appdsmartagent
    $ notepad config.ini
  3. Install and start Smart Agent by usingsmartagentctl.
    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 --service
  4. (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.
    1. (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.
    2. (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 サポート対象エージェントをリモートホストにインストールするための要件.

    3. 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 --service --remote
  5. To validate the installation, see スマートエージェントのインストールの検証 .

スマートエージェントの変数

変数の詳細を次の表に示します。

変数名説明必須デフォルト値
userスマート エージェント プロセスを実行するユーザーいいえ
  • root
  • Administrator
groupスマート エージェント プロセスを実行するグループいいえroot

スマートエージェントのインストールパラメータ

次の表に、使用できるオプションのパラメータを示します。

パラメータ説明
--enable-auto-attach自動接続機能を有効にします。Java および NodeJS エージェントの自動付加 を参照してください。
--userスマート エージェント プロセスのユーザー名を指定します。デフォルト値は現在のユーザーです。値は文字列形式にする必要があります。
--group

スマート エージェント プロセスのグループを指定します。デフォルトは、現在のグループです。

値は文字列形式にする必要があります。

-h, --helpスマートエージェントの起動に関するヘルプを表示します。
--serviceスマートエージェントをサービスとしてインストールします。
--tomcat-env-config

Apache Tomcat 環境ファイルパス。

値は文字列形式にする必要があります。

--remoteリモートホストでスマートエージェントのインストールを開始する場合に指定します。値は boolean 形式で指定します。デフォルト値は true です。