Install the Logtail client

Updated at:

You can install the Logtail client in batches using an O&M script, or you can install it manually.

Batch installation (recommended)

  1. Create a template. In the Scalable Open Financial Architecture console, go to Operations Management > Classic Application Service > Daily O&M > Instruction Template, and click Create Template. On the New Instruction Template page, enter the environment context. For sample script content for Linux, see the dst_sls_install.sh file. The following graph shows an example of how to configure an instruction template for Linux:

    Note

    To execute the script in different workspaces, you must modify the `instanceId` and `region` parameters.

    • The `instanceId` parameter is the machine group identity. You can find this identity on the distributed tracing > Settings page.

    • The `region` parameter is the domain environment flag. For example, the value for China East 2 (Shanghai) is cn-shanghai. For more information, see Regions and zones.

  2. Execute the O&M script. In the Scalable Open Financial Architecture console, go to Classic Application Service > Daily O&M > Server O&M, and click Create. On the Create Server O&M Task page, select the template instruction that you created and the corresponding machines. Select the Automatically execute after creation checkbox, and then click Create.

    Note

    We recommend that you first select a few servers to verify that the environment is stable, and then execute the operation across the entire environment.

Manual installation

  1. Check whether the Logtail client is installed on the ECS instance.

    • On Linux, run the following command to check the client status:

      sudo /etc/init.d/ilogtaild status
    • On Windows, check the client status in Services. Go to Control Panel > Administrative Tools > Services, and check the status of the LogtailDaemon and LogtailWorker services. If they are not installed, see the instructions for installing Logtail on Linux or Windows.

  2. Add the machine group identity.

    • On Linux, create the /etc/ilogtail/user_defined_id file. The file must contain a single line with the machine group identity. To obtain this identity, go to the distributed tracing > Settings page.机器组标识

    • On Windows, open the user_defined_id file (default path: C:\LogtailData\user_defined_id). Change the file content to the machine group identity.

  3. Configure the user ID file on the ECS server. This grants the distributed tracing system permission to collect logs.

    • On Linux, create a folder in the /etc/ilogtail/users directory to configure the user identity. The folder name must be the same as your account ID. For example, for the non-financial zone in China East 2 (Shanghai):

      sudo touch /etc/ilogtail/users/1665977623349188
    • On Windows, create a folder in the C:\LogtailData\users directory to configure the user identity. The folder name must be the same as your account ID. For example, for the non-financial zone in China East 2 (Shanghai):

      C:\LogtailData\users\1665977623349188