This guide will help you through the process of installing SLS Logtail, a powerful tool for collecting and forwarding logs from various sources to Alibaba Cloud's Log Service.

Prerequisites

Before installing Logtail, make sure you have the following prerequisites:

Installation Steps

1. Download Logtail

First, download the Logtail agent package from the Logtail release page.

wget https://www.alibabacloud.com/products/logtail/download

2. Unpack the Package

Unpack the downloaded package to a directory of your choice.

tar -zxvf logtail.tar.gz

3. Configure Logtail

Edit the logtail.conf file to configure Logtail.

vi logtail.conf

Set the following configuration parameters:

  • source_type: The type of log source (e.g., file, jvm, container).
  • source: The path to the log file or container ID.
  • region: The region where your Log Service project is located.
  • project: The project name in Log Service.
  • logstore: The logstore name in Log Service.

4. Start Logtail

Start Logtail with the following command:

./logtail -c logtail.conf

5. Verify Installation

To verify that Logtail is working correctly, check the Log Service console for the logs you have configured.

Troubleshooting

If you encounter any issues during installation, refer to the Logtail troubleshooting guide for solutions.

Logtail Architecture

For more information about Logtail, visit the Logtail documentation.