Updated on 2024-02-28 GMT+08:00

Collecting Logs from API Gateway

LTS can collect logs from APIG.

This function is available only in regions AF-Johannesburg, AP-Singapore, CN-Hong Kong, CN East-Shanghai1, LA-Mexico City1, LA-Mexico City2, LA-Santiago, and LA-Sao Paulo1.

Prerequisites

You have purchased and used an API gateway.

Procedure

Perform the following operations to configure APIG log ingestion:

  1. Log in to the LTS console.
  2. In the left navigation pane, choose Log Ingestion. On the displayed page, 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. Configure APIG.

    Click Configure APIG.
    1. On the APIG console, choose Monitoring & Analysis > Log Analysis.
    2. Click Configure Log Collection.
    3. Enable log collection, and select a log group and stream.

  5. Click Next: Configure Log Stream.

    Table 1 Log stream parameters

    Parameter

    Description

    Auto Structure and Index

    If is enabled, the log stream is automatically structured and indexed. The structuring is based on the APIG template, and the indexing enables quick analysis for all parsed APIG fields.

  6. Click Submit.