Updated on 2026-08-24 GMT+08:00

Ingesting ECS Text Logs to LTS

ECSs are core computing resources that host many service applications. These applications generate text log data, including application and system logs. Such logs are essential for monitoring system health, optimizing performance, and troubleshooting. To better manage and analyze ECS text logs, you can ingest them to LTS. This centralizes log storage, enabling efficient log query, alarm reporting, and analysis.

Follow these steps to complete the ingestion configuration:

Step 1: Select a Log Stream: Store various log types in separate log streams for better categorization and management.

Step 2: (Optional) Select Host Groups: Define the range of hosts for log ingestion. Host groups are virtual groups of hosts. They help you organize and categorize hosts, making it easier to configure log ingestion for multiple hosts simultaneously. You can add one or more hosts whose logs are to be collected to a single host group, and associate it with the same ingestion configuration.

Step 3: Configure the Collection: Configure the log collection details, including collection paths and policies.

Step 4: Configure Indexing: An index is a storage structure used to query log data. Configuring indexing makes log searches and analysis faster and easier.

Step 5: Complete the Ingestion Configuration: After a log ingestion configuration is created, manage it in the ingestion list.

Setting Multiple Ingestion Configurations in a Batch: Select this mode to collect logs from multiple scenarios.

Constraints

  • For constraints on ICAgent, see ICAgent Constraints.
  • If a collection path of a host has been configured in AOM, do not configure it again in LTS. For details, see Configuring VM Log Collection Paths.
  • When configuring log ingestion, you can select multiple host groups and add multiple hosts to a host group. This flexibility allows you to control log ingestion by setting different paths for various hosts and selecting multiple host groups.
  • After LTS delivers the collection configuration, ICAgent collects files according to the following rules:
    • New files (collected for the first time): If the last modification time of a file is more than 6 hours earlier than the current time, the file is not collected.
    • Old files (not collected for the first time): If the last modification time of a file is more than 3 minutes earlier than the current time, the file is not collected.
  • LTS cannot collect logs of PostgreSQL (database) instances.
  • The maximum number of cursor files is 50,000. If this threshold is crossed, ICAgent stops adding new collection tasks.

Prerequisites

Step 1: Select a Log Stream

  1. Log in to the LTS console.
  2. In the navigation pane, choose Log Ingestion > Ingestion Center. On the displayed page, select Running environments or Cloud services under Types. Hover the cursor over the Elastic Cloud Server(ECS) card and click Ingest Log (LTS) to access the configuration page.
    Figure 1 Accessing the ECS log ingestion configuration page

    Alternatively, choose Log Ingestion > Ingestion Management in the navigation pane. Click Create. On the displayed page, select Running environments or Cloud services under Types. Hover the cursor over the Elastic Cloud Server(ECS) card and click Ingest Log (LTS) to access the configuration page.

  3. Select a log group.
    • To use an existing log group: Select a log group from the Log Group drop-down list.
    • To use a new log group: If there is no desired log group, click Create Log Group to create one. For details, see Managing Log Groups.
  4. Select a log stream.
    • To use an existing log stream: Select a log stream from the Log Stream drop-down list.
    • To use a new log stream: If there is no desired log stream, click Create Log Stream to create one. For details, see Managing Log Streams.
  5. Click Next: (Optional) Select Host Group.

Step 2: (Optional) Select Host Groups

A host group is a virtual group of hosts, allowing you to configure host log collection efficiently. Ensure that ICAgent has been installed on hosts where logs are to be collected and the hosts have been added to a host group.

  1. Select one or more host groups.
    • To select existing host groups: In the host group list, select one or more host groups to collect their logs.

      You can skip this step by not selecting any host group and clicking Next: Configurations, and then Skip in the subsequent dialog box. However, if you skip this step, the collection configuration will not take effect. It is advised to select host groups during the initial ingestion configuration.

      If you initially skip host group selection, you can associate host groups later using either method:

      • Choose Host Management > Host Groups in the navigation pane and associate host groups with the desired ingestion configuration. For details, see Figure 2.
        Figure 2 Associating host groups with an ingestion configuration
      • After the ingestion configuration is created, choose Log Ingestion > Ingestion Management in the navigation pane. Click Modify in the Operation column of the desired ingestion configuration and associate it with host groups. For details, see Figure 3.
        Figure 3 Modifying an ingestion configuration
    • If there are no desired host groups, click Create above the host group list. On the Create Host Group page, add hosts based on their ICAgent installation status.
      • If ICAgent is already installed: Select the hosts with ICAgent installed under Add Host. For details, see Managing Host Groups.
      • If ICAgent is not yet installed: Click Install ICAgent under Add Host. Select Intra-region hosts or Extra-region hosts based on the host location and proceed with the ICAgent installation. For details, see Installing ICAgent (Intra-Region Hosts) and Installing ICAgent (Extra-Region Hosts). After ICAgent is installed on the desired host, return to the ECS log ingestion page, click Create above the host group list again. The desired host will now be displayed under Add Host on the Create Host Group page.
      Figure 4 Creating a host group
  2. Click Next: Configurations.

Step 3: Configure the Collection

Collection configuration items include the log collection scope, collection mode, and format processing. Configure them as follows.

Figure 5 Basic collection settings

Protect your privacy and sensitive data. You are advised not to transmit privacy or sensitive data through fields involved in access logs. Encrypt the data if necessary.

Step 4: Configure Indexing

An index is a storage structure used to query log data. Configuring indexing makes log searches and analysis faster and easier. Different index settings generate different query and analysis results. Configure index settings to fit your service requirements.

  • If you do not want to query or analyze logs using specific fields, you can skip configuring indexing when configuring log ingestion. This will not affect log collection. You can also configure indexing after creating the log ingestion configuration. However, index settings will only apply to newly ingested logs. For details, see Configuring Log Indexing. If you choose to skip this step, retain the default settings on the Index Settings page and click Skip and Submit. The message "Logs ingested" will appear.
  • To query or analyze logs using specific fields, configure indexing on the Index Settings page when creating an ingestion configuration. For details, see Configuring Log Indexing.

    On this page, click Auto Configure to have LTS generate index fields based on the first log event in the last 15 minutes or common system reserved fields (such as hostIP, hostName, and pathFile). You can also manually add structured fields. After completing the settings, click Submit. The message "Logs ingested" will appear. You can also adjust the index settings after the ingestion configuration is created. However, the changes will only affect newly ingested logs.

Step 5: Complete the Ingestion Configuration

The created ingestion configuration will be displayed.

Figure 8 Ingestion configuration
  • Click its name to view its details.
  • Click Modify in the Operation column to modify the ingestion configuration.

    You can quickly navigate and modify settings by clicking Select Log Stream, (Optional) Select Host Group, Configurations, or Index Settings in the navigation tree at the top of the page. After making your modifications, click Submit to save the changes. This operation is available for all log ingestion modes except CCE logs, ServiceStage containerized application logs, and self-built Kubernetes cluster logs.

  • Click More > Configure Tag in the Operation column to add a tag.
  • Click More > Copy in the Operation column to copy the ingestion configuration.
  • Click Delete in the Operation column to delete the ingestion configuration.

    Deleting an ingestion configuration may lead to log collection failures, potentially resulting in service exceptions related to user logs. In addition, the deleted ingestion configuration cannot be restored. Exercise caution when performing this operation.

  • To stop log collection of an ingestion configuration, toggle off the switch in the Ingestion Configuration column to disable the configuration. To restart log collection, toggle on the switch in the Ingestion Configuration column.

    Disabling an ingestion configuration may lead to log collection failures, potentially resulting in service exceptions related to user logs. Exercise caution when performing this operation.

  • Click More > ICAgent Collect Diagnosis in the Operation column of the ingestion configuration to monitor the exceptions, overall status, and collection status of ICAgent. If this function is not displayed, enable ICAgent diagnosis by referring to Setting ICAgent Collection.

Setting Multiple Ingestion Configurations in a Batch

You can set multiple ingestion configurations for multiple scenarios in a batch, avoiding repetitive setups.

  1. On the Ingestion Management page, click Batch Create to go to the configuration details page.

    1. Ingestion Type: Select ECS (Elastic Cloud Server).
    2. Rule List:
      • Enter the number of ingestion configurations in the text box and click Add.
      • Enter a rule name under Configuration Items on the right. You can also double-click the name of the ingestion configuration on the left to replace it with a custom name after setting the configuration items. Enter 1 to 64 characters, including only letters, digits, hyphens (-), underscores (_), and periods (.). Do not start with a period or underscore or end with a period.
      • To copy an ingestion configuration, move the cursor to it and click .
      • To delete an ingestion configuration, move the cursor to it and click . In the displayed dialog box, click OK.
    3. Configuration Items:
      • The ingestion configurations are displayed on the left. You can add up to 99 more configurations.
      • The ingestion configuration items are displayed on the right. Set them by referring to Step 3: Configure the Collection.
      • After an ingestion configuration is complete, you can click Apply to Other Configurations to copy its settings to other configurations.

  2. Click Check Parameters. After the check is successful, click Submit.

    The added ingestion configurations will be displayed on the Ingestion Management page after the batch creation is successful.

  3. (Optional) Perform the following operations on ingestion configurations:

    • Select multiple existing ingestion configurations and click Edit. On the displayed page, select an ingestion type to modify the corresponding ingestion configurations.
    • Select multiple disabled ingestion configurations, click Enable/Disable Ingestion Configuration, and select Enable to enable them in a batch.
    • Select multiple enabled ingestion configurations, click Enable/Disable Ingestion Configuration, and select Disable. Logs will not be collected for disabled ingestion configurations. Exercise caution when disabling these configurations.
    • Select multiple existing ingestion configurations and click Delete.

Tagging an Ingestion Configuration

You can add tags to existing ingestion configurations for easy identification, searching, and management. Each tag consists of a tag key and a tag value. Adding, changing, or removing tags of an ingestion configuration does not affect other ingestion configurations.

  1. In the navigation pane, choose Log Ingestion > Ingestion Management.
  2. Click More > Configure Tag in the Operation column of the desired ingestion configuration.
  3. On the displayed page, click Add and enter a tag key and value. To add more tags, repeat this step. A maximum of 20 tags can be added.

    Figure 9 Editing ingestion configuration tags

    Tag key restrictions:

    • A tag key can contain letters, digits, spaces, and special characters (_.:=+-@), but cannot start or end with a space or start with _sys_.
    • A tag key can contain up to 128 characters.
    • Each tag key must be unique.

    Tag value restrictions:

    • A tag value can contain letters, digits, spaces, and the following special characters: _.:=+-@
    • A tag value can contain up to 255 characters.

    Tag policies:

    If your organization has configured tag policies for LTS, follow the policies when adding tags to log groups, log streams, log ingestion configurations, host groups, and alarm rules. Non-compliant tags may cause the creation of these resources to fail. Contact your administrator to learn more about the tag policies. For details about tag policies, see Overview of a Tag Policy. For details about tag management, see Managing Tags.

    Deleting a tag:

    On the Configure Tag page, click Delete in the Operation column of the tag.

    If a tag is used by a transfer task, you need to modify the task configuration after deleting the tag.

  4. Click OK. On the Ingestion Management page, you can view the added tags in the Tags column of the ingestion configuration.

    Figure 10 Ingestion configuration tags

Helpful Links