Updated on 2024-03-22 GMT+08:00

Collecting Logs from CDN

This section describes the CDN structuring template details.

Structuring Template Details

  • Log example
    Table 1 Structuring template example

    Template Name

    Example Log

    CDN

    {"request_time":"1666604392000","domain":"findercdn.video.qq.com","method":"GET","scheme":"http","uri":"/BcimRg.txt","uri_param":"cdnkey=******&cdntoken=******&tokenidx=1","client_ip":"192.168.233.142","client_port":"51517","refer_protocol":"-","refer_domain":"-","refer_uri":"-","refer_param":"-","request_size":"301","response_time":"14","response_size":"588","http_code":"403","response_range":"-","request_range":"-","request_body_bytes":"150","content_type":"text/html","hit_info":"HIT","user_agent":"python-requests/2.21.0","uuid":"ce6327e015c1e16f581818b838a6cb0c","via_info":"edge-cache01[14]","xforwordfor":"-"}

    The value of cdnkey is for reference only.

  • Structuring fields and description
    Table 2 Structuring fields

    Field

    Example

    Description

    Type

    request_time

    1666604392000

    Request timestamp, in milliseconds

    string

    domain

    findercdn.video.qq.com

    Requested domain name

    string

    method

    GET

    Request mode

    string

    scheme

    http

    Request protocol

    string

    uri

    /BcimRg.txt

    Requested resource

    string

    uri_param

    cdnkey=******&cdntoken=******&tokenidx=1

    Request parameters

    string

    client_ip

    192.168.233.142

    User IP address

    string

    client_port

    51517

    Client port for connecting to CDN PoPs

    string

    refer_protocol

    -

    HTTP referer protocol

    string

    refer_domain

    -

    HTTP referer domain

    string

    refer_uri

    -

    HTTP referer URI

    string

    refer_param

    -

    HTTP referer parameters

    string

    request_size

    301

    Request size

    string

    response_time

    14

    Response duration, in milliseconds

    string

    response_size

    588

    Response size, in bytes

    string

    http_code

    403

    Response code

    string

    response_range

    -

    Range information (created by the origin server) in response headers, for example, bytes: 0-99/200.

    string

    request_range

    -

    Value of range in request headers, for example, bytes: 0-100.

    string

    request_body_bytes

    150

    Actual size of the sent body, in bytes

    string

    content_type

    text/html

    Type of the requested resource

    string

    hit_info

    HIT

    Hit information. The value can be HIT or MISS.

    string

    user_agent

    python-requests/2.21.0

    UA

    string

    uuid

    ce6327e015c1e16f581818b838a6cb0c

    Unique request ID on the entire network, that is, traceid.

    string

    via_info

    edge-cache01[14]

    via header information

    string

    xforwordfor

    -

    XForwardFor field in request headers

    string