Logtail and LoongCollector refer to the same log collection software at different stages. This document covers behavioral changes across versions and provides upgrade and rollback procedures.
Behavioral changes across versions
Version naming
Logtail, iLogtail, and LoongCollector refer to the same software:
-
Logtail/iLogtail: Versions earlier than 3.0.
-
LoongCollector: Version 3.0 and later.
Log and tag parsing standardization
-
Duplicate keys in the log entity:
-
Versions 1.8 and later: Duplicate keys are not allowed in the log entity. For example, if the input is
content: xxx, content: yyy, onlycontent: xxxis retained. -
Versions earlier than 1.8: All duplicate keys are retained and renamed. For example, the output is
content: xxx, content_0: yyy.
-
-
Duplicate keys in log tags:
-
Versions 1.8 and later: Duplicate keys are not allowed in log tags. For example, if the input is
__tag__:tag: xxx, __tag__:tag: yyy, only__tag__:tag: xxxis retained. -
Versions earlier than 1.8: All duplicate keys are retained and renamed. For example, the output is
__tag__:tag: xxx, __tag__:tag_0: yyy.
-
Single-line and multi-line log processing
-
Exception handling:
-
Version 2.x: By default, logs are split by
\n. To discard unmatched content, set theMultiline.UnmatchedContentTreatmentparameter todiscard. -
Version 1.x: If a log cannot be matched to a multi-line start pattern, the entire content is processed as a single log.
-
-
Last log line processing:
-
Versions earlier than 1.8: The system does not output the last log line that does not end with a newline, or the last multi-line segment, until it receives a newline or the next multi-line segment.
-
Versions 1.8 and later: A timeout mechanism controls this behavior. To ensure the integrity of the last segment, the default delay is 60 seconds. Starting from version 2.0, the global control parameter is
default_reader_flush_timeout, and the collection configuration-level control parameter isFlushTimeoutSecs. Adjust these parameters if your application requires lower latency. Do not set these parameters to 0, because this may cause log truncation.
-
Tag processing
Tags processed by an extension are written to the tags structure of the data model instead of the content structure. This change reduces storage space:
-
Data consumption scenarios are affected. Handle compatibility in your downstream consumers.
-
Query scenarios are not affected.
Container log collection path depth
When you collect container logs from an ACK cluster, if you create the configuration by using the ACK console:
-
Version 2.0 and later: The default maximum recursion depth for a folder is 0. If the collection path contains
/**/, the depth is 10. -
Versions earlier than 2.0: The default maximum recursion depth is 100.
Host scenarios
Upgrade from Logtail to LoongCollector
Run the appropriate command from the following table to upgrade Logtail to LoongCollector based on the host operating system.
|
Host type |
Operating system |
Download method |
Installation method |
|
Linux |
ARM |
The host is connected to the internet. Download the script directly.
|
You can choose the installation command based on your network conditions.
|
|
x86-64 |
|||
|
ARM |
The host is offline. First, download the installation script and package on a server that can access the public network.
|
Copy the installation script and package to the server where you want to install
|
|
|
x86-64 |
The host is offline. First, download the installation script and package on a server that can access the public network.
|
The upgrade is successful if the output is similar to the following:
Try to stop ilogtail ...
kill process Name: ilogtail pid: 878
kill process Name: ilogtail pid: 879
stop successfully
Stop ilogtail successfully.
Upgrading loongcollector files ...
Upgrade loongcollector files successfully.
Starting loongcollector ...
loongcollector is running
Upgrade loongcollector successfully.
Roll back from LoongCollector to Logtail
Run the appropriate command from the following table to roll back LoongCollector to Logtail.
Download the logtail.sh script again. Do not reuse an old copy of the script.
|
Operating system |
Download method |
Upgrade method |
|
ARM and x86-64 |
Host has Internet access:
|
After download completes, run the upgrade command.
To specify a particular version, run this command instead.
|
|
ARM |
Host is offline. First, download the installation script and package on a server with Internet access:
|
Copy the installation script and package to the target server. Then run the upgrade command.
|
|
x86-64 |
Host is offline. First, download the installation script and package on a server with Internet access:
|