Help Center> Log Tank Service> User Guide> Log Transfer> Transferring Logs to DIS

Transferring Logs to DIS

DIS provides both log storage and big data analysis. To be specific, DIS can transfer a large number of log files to the cloud for backup, offline analysis, query, and machine learning. In addition, DIS can be used for data recovery and fault analysis after data loss or exceptions. During transfer, a large number of small text files can be merged into a large file to accelerate data processing.

Prerequisites

  • You have created log groups and log streams.
  • You have installed ICAgent.
  • You have configured log collection rules.
  • You have purchased a DIS stream.

    You will be billed by the storage you use in DIS. For details, see Product Pricing Details.

Procedure

  1. Log in to the LTS console, click Log Transfer in the left navigation pane.
  2. Click Create Log Transfer in the upper right corner.
    Figure 1 Creating a transfer task (DIS)
  3. On the displayed page, configure transfer parameters.

    After a transfer task is created, parameters except the log group and transfer mode can be modified.

    Table 1 Transfer parameters

    Parameter

    Description

    Example Value

    Log Group Name

    Select a log group.

    N/A

    Log Stream Name

    Select a log stream.

    N/A

    Transfer Mode

    Select a cloud service for log transfer.

    DIS

    DIS Stream Name

    Select a DIS stream. If no stream is available, click View DIS Streams to access the DIS console and create a stream.

    N/A

    Format

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

    • An example of the raw log format is as follows:
      Logs displayed on the LTS console are in the raw format.
      Sep 30 07:30:01 ecs-bd70 CRON[3459]: (root) CMD (/opt/oss/servicemgr/ICAgent/bin/manual/mstart.sh > /dev/null 2>&1)
    • An example of the JSON format is as follows:
      {"host_name":"ecs-bd70","ip":"192.168.0.54","line_no":249,"message":"Sep 30 14:40:01 ecs-bd70 CRON[4363]: (root) CMD (/opt/oss/servicemgr/ICAgent/bin/manual/mstart.sh > /dev/null 2>&1)\n","path":"/var/log/syslog","time":1569825602303}

    JSON

    Whether to Enable Transfer

    Indicates whether to enable log transfer.

    Enabled

    Transfer Cycle

    Logs are transferred to the DIS stream in real time.

    Real time

  4. Click OK. When the log transfer status changes to Normal, the transfer task is created successfully.
  5. Click the DIS stream name in the Transfer Destination column to access the DIS console and view transferred log files.

    Transferred logs can be downloaded from DIS to your local computer for viewing.