Updated on 2024-09-19 GMT+08:00

Ingesting APIG Logs to LTS

LTS can collect logs from APIG.

Prerequisites

You have created and used an API gateway of Huawei Cloud.

Configuring APIG Log Ingestion to LTS

Perform the following operations to configure APIG log ingestion:

  1. Log in to the LTS console.
  2. Choose Log Ingestion > Ingestion Center in the navigation pane. Then, click APIG (API Gateway).
  3. Select a log stream.

    1. Select a log group from the Log Group drop-down list. If there are no desired log groups, click Create Log Group to create one.
    2. Select a log stream from the Log Stream drop-down list. If there are no desired log streams, click Create Log Stream to create one.
    3. Click Next: Configure APIG.

  4. Click Configure APIG to configure APIG on the APIG console. For details, see Log Analysis.
  5. Click Next: Configure Log Stream.

    Table 1 Log stream parameters

    Parameter

    Description

    Auto Structure and Index

    If this function is enabled, the structuring for the log stream is based on the APIG system template, and the indexing enables quick analysis for all parsed APIG fields. Enabling structuring and indexing is required for SQL analysis of APIG logs with visual charts.

    Auto Add Tag log_type=apig_access

    If this option is enabled, the tag log_type=apig_access is automatically added to the log stream, and the APIG dashboard template can then match this log stream.

    Auto Create Chart

    If this option is enabled, an APIG dashboard is automatically created for the log stream.

  6. Click Submit.