Creating a Log Transfer Task

Scenarios

This section describes how to create a log transfer task. Logs uploaded to Log Tank Service (LTS) can be stored for seven days. To store the logs for a longer period of time, you can transfer them to an Object Storage Service (OBS) bucket.

Prerequisites

  • You have created a log group.

  • You have created a log stream.

  • You have created an OBS bucket.

Procedure

  1. Log in to the management console.

  2. In the upper left corner of the management console, select the target region and project.

  3. Click Service List and choose Management & Deployment > Log Tank Service.

  1. In the navigation pane on the left, choose Log Transfer.

  2. On the displayed page, click Create Log Transfer.

    **Figure 1** Configuring parameters for a log transfer task

    Figure 1 Configuring parameters for a log transfer task

  3. On the displayed page, configure parameters.

    Table 1 Parameters description

    Parameter

    Description

    Example Value

    Log Group Name

    Specifies the log group name. Select a created log group.

    lts-group-wule

    Log Stream Name

    Select a log stream.

    LogTopic1

    OBS Bucket

    Specifies the created OBS bucket. If no OBS bucket is available, click View OBS Bucket.

    obs-8a09

    Custom Log Transfer Path

    • Enabled: Logs will be transferred to a custom path to separate transferred log files of different log streams.

      The format is /LogTanks/Region name/Custom path. The file path:

      • Must start with /LogTanks/Region name.

      • Contains up to 64 characters. The path name cannot be empty.

      • Can contain only letters, digits, hyphens (-), underscores (_), periods (.), and slashes (/).

      Example: If you enter LTS-test, the log transfer path is: LogTanks_Region name_LTS-test_2019_01_01_Log file name.

    • Disabled: Logs will be transferred to the default path. The default path is LogTanks_Region name_2019_01_01_Log group_Log stream_Log file name.

    LTS-test

    Log File Prefix

    The file name prefix of the log files transferred to an OBS bucket.

    The prefix:

    • Can contain up to 64 characters.

    • Can contain only letters, digits, hyphens (-), underscores (_), and periods (.).

    Example: If you enter LTS-log, the log file name will be LTS-log_Log file name.

    lts

    Format

    Specifies the storage format of logs. The value can be Raw Log Format or JSON.

    JSON

    Transfer Log to OBS

    Specifies whether to enable log transfer.

    Enable

    Transfer Period

    The interval for automatically transferring logs to OBS buckets. The value can be 2, 5, or 30 minutes, or 1, 3, 6, or 12 hours.

    3 hours

  4. Click OK. When the log transfer status changes Normal, the transfer task is created successfully.