Updated on 2024-05-27 GMT+08:00

Log Groups

A log group is a group of log streams that share the same log retention settings. Up to 100 log groups can be created for a single account.

Prerequisites

If the IAM users under your account want to use LTS, you need to grant them the permissions required. For details, see Permissions Management.

Creating a Log Group

  1. Log in to the LTS console. On the Log Management page, click Create Log Group.
  2. On the displayed page, set log group parameters by referring to Table 1.
    Table 1 Log group parameters

    Parameter

    Description

    Log Group Name

    • A log group name can contain 1 to 64 characters, including only letters, digits, hyphens (-), underscores (_), and periods (.). It cannot start with a period or underscore or end with a period.
    • Collected logs are sent to the log group. 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.

    Log Retention Duration

    Retention duration of the log group.

    NOTE:
    • Currently, logs of whitelisted users can be retained for 1,095 days. If necessary, submit a service ticket.
    • Creating log groups is free of charge. You are charged based on the log volume. For details, see Price Calculator.

    Tag

    You can add tags to each log group. Click Add Tags, enter a tag key and tag value, and enable Apply to Log Stream.

    NOTE:
    • To add multiple tags, repeat this step.
    • To delete a tag, click 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 group will be displayed in the log group list.
    • In the log group list, you can view information such as the log group name, tags, and log streams.
    • Click the log group name, the details page of one of its log streams is displayed.
    • When multiple log groups are created concurrently, there may be a limit exceeding error.

Modifying a Log Group

You can modify the log name, log retention duration, or remarks of a log group by performing the following steps:

  1. In the log group list, locate the target log group and click Modify in the Operation column.
  2. Modify the log name and log retention duration on the displayed page.
  3. Click OK.
  4. After the modification is successful, move the cursor over the log group name. The new and original log group names are displayed.
    Figure 1 Log group name

Deleting a Log Group

You can delete a log group that is no longer needed. Deleting a log group will also delete the log streams and log data in the log group. Deleted log groups cannot be recovered. Exercise caution when performing the deletion.

If you want to delete a log group that is associated with a log transfer task, delete the task first.

  1. In the log group list on the Log Management page, locate the target log group and click Delete in the Operation column.
  2. Enter DELETE and click OK.
    Figure 2 Deleting a log group

Searching Log Groups/Streams

In the log group list, click the search box and set the following filter criteria:

  • Log group/stream
  • Original log group/stream name
  • Log group name/ID
  • Log stream name/ID
  • Log group tag
  • Remarks
Figure 3 Searching log groups/streams

Other Operations

To view the details of a log group, including the log group name, ID, and creation time, go to the log group list and click Details in the Operation column of the desired log group.

Click next to the search box to download all displayed information about the log group to the local PC.