Help Center/ Log Tank Service/ Getting Started/ Creating Log Groups and Log Streams

Creating Log Groups and Log Streams

Updated on 2025-02-13 GMT+08:00

Prerequisites

You have obtained an account and its password for logging in to the console.

Creating a Log Group

  1. Log in to the management console and choose Management & Deployment > Log Tank Service.
  2. On the Log Management page, click Create Log Group.
  3. In the dialog box displayed, set log group parameters by referring to Table 1.
    Table 1 Log group parameters

    Parameter

    Description

    Log Group Name

    • 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.
    • Collected logs are sent to log streams of the corresponding log groups. If there are too many logs to collect, separate logs into different log groups based on log types, and name log groups in an easily identifiable way.

    Enterprise Project Name

    Select an enterprise project. You can click View Enterprise Projects to view all enterprise projects.

    Enterprise projects allow you to manage cloud resources and users by project.

    Log Retention (Days)

    Specify the log retention duration for the log group, that is, how many days the logs will be stored in LTS after being reported to LTS.

    By default, logs are retained for 30 days (customizable for 1 to 30 days).

    Tag

    Tag the log group as required. Click Add Tags, enter a tag key and value, and enable Apply to Log Stream.

    • To add more tags, repeat this step. A maximum of 20 tags can be added.
    • To delete a tag, click Delete in the Operation column of the tag.
    • A tag key can contain up to 128 characters, and a tag value can contain up to 255 characters.
    • A tag key must be unique.
    • If a tag is used by a transfer task, you need to modify the task configuration after deleting the tag.

    Remark

    Enter remarks. The value contains up to 1,024 characters.

  4. Click OK. The created log group will be displayed in the log group list.

Creating a Log Stream

  1. Click on the left of a log group name and click Create Log Stream.
  2. In the dialog box displayed, set log stream parameters by referring to Table 2.
    Table 2 Log stream parameters

    Parameter

    Description

    Log Group Name

    The name of the target log group is displayed by default.

    Log Stream Name

    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.

    Enterprise Project Name

    Select the required enterprise project. The default value is default. You can click View Enterprise Projects to view all enterprise projects.

    Log Retention (Days)

    Specify the log retention duration for the log stream, that is, how many days the logs will be stored in LTS after being reported to LTS.

    By default, logs are retained for 30 days (customizable for 1 to 30 days).

    • If you enable Log Retention (Days) for the log stream, logs are retained for the duration set for the log stream.
    • If you disable Log Retention (Days) for the log stream, logs are retained for the duration set for the log group.
    • The logs that exceed the retention period will be automatically deleted. You can transfer logs to OBS buckets for long-term storage.

    Tag

    You can tag log streams as required. Click Add Tags and enter a tag key and tag value.

    • To add more tags, repeat this step. A maximum of 20 tags can be added.
    • To delete a tag, click Delete in the Operation column of the tag.
    • A tag key can contain up to 128 characters, and a tag value can contain up to 255 characters.
    • A tag key must be unique.
    • If a tag is used by a transfer task, you need to modify the task configuration after deleting the tag.

    Remark

    Enter remarks. The value contains up to 1,024 characters.

  3. Click OK. The created log stream will be displayed under the target log group.
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback