The Logtail client is a log collection agent provided by Log Service. This topic describes how to install the Logtail client on a Windows server.

Supported systems

The Logtail client for Windows supports the following operating systems:

  • Windows 7 (Client) 32-bit
  • Windows 7 (Client) 64-bit
  • Windows Server 2008 32-bit
  • Windows Server 2008 64-bit
  • Windows Server 2012 64-bit
  • Windows Server 2016 64-bit

Prerequisites

  1. One or more servers are available.
  2. The network type for log collection is determined based on the type and region of the server. For more information, see Select a network type.
    Figure 1. Select a network type


Install Logtail

  1. Download the installation package.
    Download links:
    • If you are in Mainland China, click here.
    • If you are outside Mainland China, click here.
  2. Decompress the logtail_installer.zip package to the current directory.
  3. Select a network type based on the type and region of the server, and then install Logtail based on the region of the Log Service project.

    Run PowerShell or CMD as an administrator to go to the logtail_installer directory where you decompress the Logtail installation package. Then, run the installation command based on the region and network type.

    The following table lists the installation commands for different network types in different regions.
    Region Alibaba Cloud internal network (classic network or VPC) Internet Global Acceleration
    China (Qingdao) .\logtail_installer.exe install cn-qingdao .\logtail_installer.exe install cn-qingdao-internet .\logtail_installer.exe install cn-qingdao-acceleration
    China (Beijing) .\logtail_installer.exe install cn-beijing .\logtail_installer.exe install cn-beijing-internet .\logtail_installer.exe install cn-beijing-acceleration
    China (Zhangjiakou) .\logtail_installer.exe install cn-zhangjiakou .\logtail_installer.exe install cn-zhangjiakou-internet .\logtail_installer.exe install cn-zhangjiakou-acceleration
    China (Hohhot) .\logtail_installer.exe install cn-huhehaote .\logtail_installer.exe install cn-huhehaote-internet .\logtail_installer.exe install cn-huhehaote-acceleration
    China (Hangzhou) .\logtail_installer.exe install cn-hangzhou .\logtail_installer.exe install cn-hangzhou-internet .\logtail_installer.exe install cn-hangzhou-acceleration
    China (Shanghai) .\logtail_installer.exe install cn-shanghai .\logtail_installer.exe install cn-shanghai-internet .\logtail_installer.exe install cn-shanghai-acceleration
    China (Shenzhen) .\logtail_installer.exe install cn-shenzhen .\logtail_installer.exe install cn-shenzhen-internet .\logtail_installer.exe install cn-shenzhen-acceleration
    China (Chengdu) .\logtail_installer.exe install cn-chengdu .\logtail_installer.exe install cn-chengdu-internet .\logtail_installer.exe install cn-chengdu-acceleration
    Hong Kong .\logtail_installer.exe install cn-hongkong .\logtail_installer.exe install cn-hongkong-internet .\logtail_installer.exe install cn-hongkong-acceleration
    US (Silicon Valley) .\logtail_installer.exe install us-west-1 .\logtail_installer.exe install us-west-1-internet .\logtail_installer.exe install us-west-1-acceleration
    US (Virginia) .\logtail_installer.exe install us-east-1 .\logtail_installer.exe install us-east-1-internet .\logtail_installer.exe install us-east-1-acceleration
    Singapore .\logtail_installer.exe install ap-southeast-1 .\logtail_installer.exe install ap-southeast-1-internet .\logtail_installer.exe install ap-southeast-1-acceleration
    Australia (Sydney) .\logtail_installer.exe install ap-southeast-2 .\logtail_installer.exe install ap-southeast-2-internet .\logtail_installer.exe install ap-southeast-2-acceleration
    Malaysia (Kuala Lumpur) .\logtail_installer.exe install ap-southeast-3 .\logtail_installer.exe install ap-southeast-3-internet .\logtail_installer.exe install ap-southeast-3-acceleration
    Indonesia (Jakarta) .\logtail_installer.exe install ap-southeast-5 .\logtail_installer.exe install ap-southeast-5-internet .\logtail_installer.exe install ap-southeast-5-acceleration
    India (Mumbai) .\logtail_installer.exe install ap-south-1 .\logtail_installer.exe install ap-south-1-internet .\logtail_installer.exe install ap-south-1-acceleration
    Japan (Tokyo) .\logtail_installer.exe install ap-northeast-1 .\logtail_installer.exe install ap-northeast-1-internet .\logtail_installer.exe install ap-northeast-1-acceleration
    Germany (Frankfurt) .\logtail_installer.exe install eu-central-1 .\logtail_installer.exe install eu-central-1-internet .\logtail_installer.exe install eu-central-1-acceleration
    UAE (Dubai) .\logtail_installer.exe install me-east-1 .\logtail_installer.exe install me-east-1-internet .\logtail_installer.exe install me-east-1-acceleration
    UK (London) .\logtail_installer.exe install eu-west-1 .\logtail_installer.exe install eu-west-1-internet .\logtail_installer.exe install eu-west-1-acceleration
    Note If you use Logtail on a server deployed in an on-premises IDC or provided by another cloud service vendor, Log Service cannot obtain the owner information about ECS instances under other Alibaba Cloud accounts or other types of servers. In this case, you must manually configure AliUids after installing Logtail. Otherwise, Logtail has abnormal heartbeats and cannot collect logs. For more information, see Configure AliUids for ECS servers under other Alibaba Cloud accounts or on-premises IDCs.

Go to the installation path

After you run the installation command, Logtail is installed in the specified path, which cannot be changed. In this path, you can view the Logtail version in the app_info.json file or uninstall Logtail.

The installation path is as follows:

  • 32-bit Windows: C:\Program Files\Alibaba\Logtail
  • 64-bit Windows: C:\Program Files (x86)\Alibaba\Logtail
Note You can run a 32-bit or 64-bit application in 64-bit Windows. However, the operating system stores 32-bit applications in an x86 folder to ensure compatibility.

Logtail for Windows is a 32-bit application. Therefore, it is installed in the Program Files (x86) folder in 64-bit Windows. If Logtail for 64-bit Windows becomes available in the future, it will be automatically installed in the Program Files folder.

View the Logtail version

Logtail is automatically installed in the default directory. To view the Logtail version, you can go to the directory and use Notepad or another text editor to open the app_info.json file. The logtail_version field indicates the version of the installed Logtail.

In the following example, the Logtail version is 1.0.0.0:
{
    "logtail_version" : "1.0.0.0"
}

Upgrade Logtail

  • Automatic upgrade

    In normal cases, Logtail for Windows is automatically upgraded. However, you must manually upgrade Logtail earlier than 1.0.0.0 to Logtail 1.0.0.0 or later.

  • Manual upgrade

    You must manually upgrade Logtail earlier than 1.0.0.0 to Logtail 1.0.0.0 or later. The procedure for manually upgrading Logtail is the same as that for installing Logtail. You only need to download and decompress the latest installation package and install Logtail by following the steps.

    Note During manual upgrade, Logtail is automatically uninstalled and then reinstalled. In this case, files in the original installation directory are deleted. If necessary, we recommend that you back up the files before manually upgrading Logtail.

Manually start or stop Logtail

In the Control Panel, choose System and Security > Administrative Tools, and then double-click Services.

Find the target service based on your Logtail version.
  • Logtail 0.x.x.x: LogtailWorker.
  • Logtail 1.0.0.0 and later: LogtailDaemon.
Perform the following operations as required:
  • Manually start Logtail: Right-click Logtail and select Start.

  • Stop Logtail: Right-click Logtail and select Stop.

  • Restart Logtail: Right-click Logtail and select Restart.

Uninstall Logtail

Run PowerShell or CMD as an administrator to go to the logtail_installer directory where you decompress the Logtail installation package. Then, run the following command to uninstall Logtail:

.\logtail_installer.exe uninstall

After Logtail is uninstalled, the installation directory of Logtail will be deleted. However, some residual configuration information is kept in the C:\LogtailData directory. You can manually delete the information as needed. The residual configuration information includes:

  • checkpoint: contains checkpoint information of all plug-ins, for example, the Windows event log plug-in.
  • logtail_check_point: contains major checkpoint information of Logtail.
  • users: contains configured AliUids.