All Products
Search
Document Center

Simple Log Service:Install Logtail on a Windows server

Last Updated:Dec 09, 2024

This topic describes how to install Logtail on a Windows server.

Limits

The following Windows operating systems are supported:

Note
  • If your server uses Windows Server 2008 or Windows 7, make sure that the operating systems run on x86 or x86_64.

  • If your server uses a different Windows operating system, make sure that the operating system runs on x86_64.

  • Microsoft Windows Server 2008

  • Microsoft Windows Server 2012

  • Microsoft Windows Server 2016

  • Microsoft Windows Server 2019

  • Microsoft Windows Server 2022

  • Microsoft Windows 7

  • Microsoft Windows 10

  • Microsoft Windows Server Version 1909

  • Microsoft Windows Server Version 2004

Install Logtail

  1. Log on to your server and download an installation package based on your business requirements.

  2. Decompress the logtail_installer.zip package to the current directory.

  3. Select an installation command based on the network type and the region in which your Simple Log Service project resides, and run the installation command.

    Network type

    Scenario

    Alibaba Cloud internal network

    The ECS instance that is used and your Simple Log Service project reside in the same region.

    Internet

    • The ECS instance that is used and your Simple Log Service project reside in different regions.

    • The server that is used is from a third-party cloud service provider or in a data center.

    Transfer acceleration

    The server that is used is from a third-party cloud service provider outside China or in a data center outside China. Data transfer over the Internet may cause high network latency and unstable connections. In this case, we recommend that you use the transfer acceleration feature to transfer logs.

    Alibaba Cloud internal network (the classic network or a VPC)

    1. Run Windows PowerShell or Command Prompt as an administrator. Go to the logtail_installer directory, which contains the files extracted from the installation package.

    2. Obtain the value of the ${region_id} parameter for the region in which the Simple Log Service project resides.

      Important

      For more information about the value of the ${region_id} parameter for each region, see Supported regions. For example, the value of the ${region_id} parameter for the China (Hangzhou) region is cn-hangzhou.

    3. Replace the ${region_id} parameter in the installation command with the value for the region in which your project resides, and run the installation command.

      .\logtail_installer.exe install ${region_id}

    Internet

    1. Run Windows PowerShell or Command Prompt as an administrator. Go to the logtail_installer directory, which contains the files extracted from the installation package.

    2. Obtain the value of the ${region_id} parameter for the region in which the Simple Log Service project resides.

      Important

      For more information about the value of the ${region_id} parameter for each region, see Supported regions. For example, the value of the ${region_id} parameter for the China (Hangzhou) region is cn-hangzhou.

    3. Replace the ${region_id} parameter in the installation command with the value for the region in which your project resides, and run the installation command.

      .\logtail_installer.exe install ${region_id}-internet

    Transfer acceleration

    1. Run Windows PowerShell or Command Prompt as an administrator. Go to the logtail_installer directory, which contains the files extracted from the installation package.

    2. Obtain the value of the ${region_id} parameter for the region in which the Simple Log Service project resides.

      Important

      For more information about the value of the ${region_id} parameter for each region, see Supported regions. For example, the value of the ${region_id} parameter for the China (Hangzhou) region is cn-hangzhou.

    3. Replace the ${region_id} parameter in the installation command with the value for the region in which your project resides, and run the installation command.

      .\logtail_installer.exe install ${region_id}-acceleration
      Important

      If your project resides in a region of Alibaba Finance Cloud, you cannot install Logtail by running an installation command that is suitable for transfer acceleration.

  4. View the installation path.

    Important

    After you run the installation command, Logtail is automatically installed. The installation path varies based on the operating system. You cannot change the installation path.

    • Logtail (32-bit)

      • In 32-bit Windows, Logtail is installed in the C:\Program Files\Alibaba\Logtail directory.

      • In 64-bit Windows, Logtail is installed in the C:\Program Files (x86)\Alibaba\Logtail directory.

        Note

        You can run 32-bit and 64-bit applications in a 64-bit Windows operating system. The operating system stores 32-bit applications in a separate x86 directory to ensure compatibility.

    • Logtail (64-bit)

      You can install Logtail for 64-bit Windows only in 64-bit Windows. The installation path is C:\Program Files\Alibaba\Logtail.

View the status and version of Logtail

After Logtail is installed on your server, you can view the status and version of Logtail.

View the status of Logtail

You can view the status of Logtail to check whether Logtail is installed on your server.

  1. Open the Run command window and enter services.msc to open the Services window.

  2. View the status of the LogtailDaemon or LogtailWorker service. For Logtail V1.0.0.0 or later, view the status of the LogtailDaemon service. For Logtail V0.x.x.x, view the status of the LogtailWorker service.

    If the services are in the Running state, Logtail is installed.

View the version of Logtail

Go to the installation path and open the app_info.json file. The value of the logtail_version field in the file is the Logtail version.

In the following example, the Logtail version is 1.0.0.0.

{
    "logtail_version" : "1.0.0.0"
}

Update Logtail

To update Logtail, you must download and decompress the most recent installation package. Then, you can install Logtail as prompted to complete the update. The procedure of updating Logtail is similar to the procedure of installing Logtail. For more information, see Install Logtail.

Important
  • During an update, Logtail is automatically uninstalled and then reinstalled. The original files in the installation directory are deleted. Before you update Logtail, we recommend that you back up the files.

  • If you want to update Logtail for 32-bit Windows to Logtail for 64-bit Windows in a 64-bit Windows operating system, you must uninstall Logtail for 32-bit Windows and then reinstall Logtail for 64-bit Window.

Start and stop Logtail

  1. Log on to your server.

  2. Choose Start Menu > Control Panel > Administrative Tools > Services.

  3. In the Services dialog box, select the service that you want to manage.

    • For Logtail V0.x.x.x, select LogtailWorker.

    • For Logtail V1.0.0.0 or later, select LogtailDaemon.

  4. Right-click the service and select Start, Stop, or Restart.

Uninstall Logtail

Run Windows PowerShell or Command Prompt as an administrator. Go to the logtail_installer directory, which contains the files extracted from the installation package. Then, run the following command to uninstall Logtail:

.\logtail_installer.exe uninstall

After Logtail is uninstalled, the Logtail installation directory is deleted. However, some configuration files are retained in the C:\LogtailData directory. You can manually delete the files based on your business requirements. The following configuration files are retained:

  • checkpoint: contains information about the checkpoints that are generated by Logtail plug-ins. This file is generated only if Logtail plug-ins are used.

  • user_config.d: contains local collection configurations.

    JSON files are considered collection configurations. For example, /usr/local/ilogtail/user_log_config.json is considered a collection configuration.

  • logtail_check_point: contains information about the checkpoints that are generated by Logtail.

  • users: contains the user identifier files that are configured.

Scenarios

  • Simple Log Service projects and servers belong to the same account and reside in the same region

    We recommend that you use Simple Log Service with Operation Orchestration Service (OOS) to automatically install Logtail on ECS instances that reside in the same region as your Simple Log Service projects. For more information, see Install Logtail on ECS instances.

    If automatic installation does not meet your requirements, you can manually install Logtail based on this topic.

  • Simple Log Service projects and servers belong to the same account but reside in different regions

    The following figure shows the configuration process.

    image

    You must install Logtail over the Internet. Then, you must create a machine group in a Simple Log Service project and configure Logtail to collect logs. For more information, see Create a machine group, and Collect text logs from servers.

  • Simple Log Service projects and servers belong to different accounts

    In this scenario, the server on which you want to install Logtail belongs to an Alibaba Cloud account that is different from the account of your Simple Log Service projects or resides in a data center or a third-party cloud environment. The following figure shows the configuration process.

    image

    You must install Logtail over the Internet. Then, you must use the ID of Account A to configure a user identifier and configure a custom user identifier. For more information, see Configure a user identifier. Then, you must create a custom identifier-based machine group in the Simple Log Service project of Account A and configure Logtail to collect logs. For more information, see Create a custom identifier-based machine group, Collect text logs from servers, and Use Logtail to collect logs across Alibaba Cloud accounts.