Updated on 2025-07-16 GMT+08:00

Access Logging

Scenarios

Global Accelerator logs requests sent to listeners, including the time when the request was sent, client IP address, request path, and server response.

Constraints

Log Tank Service (LTS) is a regional service. You can enable access logging for Global Accelerator in CN North-Beijing4 and AP-Singapore as needed.

To enable access logging, you need to interconnect Global Accelerator with LTS and create a log group and a log stream on the LTS console by following the instructions in the Log Tank Service User Guide.

Configuring LTS

  1. Create a log group.
    1. Log in to the management console.
    2. In the upper left corner of the page, click and select the desired region and project.
    3. In the upper left corner of the page, click and select Log Tank Service under Management & Governance.
    1. In the navigation pane on the left, choose Log Management.
    2. Click Create Log Group. In the displayed dialog box, enter a name for the log group.

      Set Log Retention Duration as required.

    1. Click OK.
  2. Create a log stream.
    1. On the LTS console, click on the left of a log group name.
    2. Click Create Log Stream. In the displayed dialog box, enter a name for the log stream.
    3. Select an enterprise project as required.
    4. Click OK.

Configuring Access Logging

  1. Log in to the Global Accelerator console.
  2. Click the name of the global accelerator to go to the details page.
  3. Click Access Logs.
  4. Click Configure Access Logging.
  1. Enable access logging and select the log group and log stream you created.
  2. Click OK.

Viewing Access Logs

  1. Log in to the Global Accelerator console.
  2. Click the name of the global accelerator to go to the details page.
  3. Click Access Logs.
  4. In the access log list, locate the target access log and click View Log Details.

    On the displayed page, view the information about the log group and log stream.

  5. Click the name of the log stream and view its details.

    The following is an example log. For details about the fields in the log, see Table 1. The log format cannot be modified.

    {
           "content": "conn_state_time:$value, conn_type: $value, conn_state: $value, proto: $value, client_ip: $value, client_port: $value, listener_ip: $value, local_ip: $value, local_port: $value, dest_ip: $value, dest_port: $value ",
           "_resource_id": "$value ",
           "_resource_name": "LISTENER",
           "_service_type": "GA",
           "category": "LTS",
           "collectTime": $value
    }
    Table 1 Parameter description

    Parameter

    Description

    Value Description

    Example Value

    conn_state_time

    Session creation/aging time

    String

    2024-01-02 09:22:56

    conn_type

    Session type recorded in the flow log

    CREATE: information about new connections

    EXPIRE: information about expired connections

    CREATE

    conn_state

    Session status when a session is recorded

    String

    ESTABLISHED

    proto

    The protocol type of a session

    TCP: TCP connections

    UDP: UDP connections

    TCP

    client_ip

    Source IP address of a session

    IP address

    127.0.0.1

    client_port

    Source port of a session

    Port number

    12345

    listener_ip

    IP address used by the accelerator

    IP address

    127.0.0.1

    local_ip

    The IP address used to communicate with endpoints

    IP address

    127.0.0.1

    local_port

    The port used to communicate with endpoints

    Port number

    24687

    dest_ip

    The IP address used by the endpoint

    IP address

    127.0.0.1

    dest_port

    The port of the endpoint

    Port number

    80

    _resource_id

    Resource ID

    uuid

    95c2b814-99dc-939a-e811-ae84c61ea9ee

    _resource_name

    Resource type

    Fixed value: LISTENER

    LISTENER

    _service_type

    Service corresponding to the flow log.

    Fixed value: GA

    GA

    category

    Log category

    Fixed value: LTS

    LTS

    collectTime

    LTS log collection time

    Integer

    1704158708902

Configuring Log Transfer

If you want to analyze access logs later, transfer the logs to OBS for storage.

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. In the upper left corner of the page, click and select Log Tank Service under Management & Governance.
  1. In the navigation pane on the left, choose Log Transfer.
  2. On the Log Transfer page, click Configure Log Transfer in the upper right corner.
    Figure 1 Configuring log transfer
  1. Configure the parameters. For details, see the Log Tank Service User Guide.