All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Manage logs

Last updated:2020-11-26 19:51:29

You can enable or disable the log management service for a domain name. To enable the log management service for a domain name, find the domain name and click Open Service in the Operate column.

  • Logs are stored by day.

56.jpg

Log fields

The following tables describe the default fields in logsthat are generated for domain names.

Standard live streaming log

  • Fields are separated with \t.
No. Field Description
1 protocol The protocol name. Valid values: rtmp and hdl.
2 client_ip The IP address of the client.
3 timestamp The time when the log is generated. It is recorded by strftime() in the format of [%d/%b/%Y:%H:%M:%S %z].
4 play_time The play duration of the entire stream that starts when the stream is pulled, in milliseconds.
5 in_bytes The number of bytes sent by the client to the server. The count starts when the stream is pulled and spans over the entire stream duration.
6 out_bytes The number of bytes sent by the server to the client. The count starts when the stream is pulled and spans over the entire stream duration.
7 host The host for pulling or ingesting the stream.
8 usid The globally unique connection ID in the format of Protocol--md5(hostnmame)-sid.
9 app The application name.
10 stream The stream name.
11 method The request method.
12 url The URL for pulling or ingesting the stream. The URL does not contain query parameters.
13 query_args The query parameters after the question mark (?) in the URL.
14 protocol_version The protocol version. Valid values: http 1.1 and rtmp 1.0.
15 status The status code. If the HTTP protocol is used, the value can be 200, 4xx, or 5xx. If the RTMP protocol is used, the value is a string such as NetStream.Play.Start.NonExistDomain.
16 content_type The MIME content type of the returned data.
17 referer The internal referer field if the HTTP protocol is used or internal pageurl field if the RTMP protocol is used.
18 User-Agent The user agent.

Standard log for VoD, AoD, large file download, and small image file delivery

No. Field Description
1 remote_addr The explicit Internet address of the access requester. The intermediate agent and firewall may hide the IP address of the access requester. If no port is available, it is set to the IP address of the access requester.
2 time_local The time when the log is generated. It is recorded by strftime() in the format of [%d/%b/%Y:%H:%M:%S %z].
3 request_time The duration starting from the time when the server receives a request to the time when the server returns the last byte of a response, in milliseconds. If the duration is timed on the client, the duration may be longer than that timed on the server due to the network latency.
4 request_length The number of bytes received at the time when the log is generated. The value includes the size of HTTP headers. If a GET request is used, this field indicates the header size. If a POST request is used, this field indicates the header size and body size.
5 bytes_sent The number of bytes sent at the time when the log is generated. The value includes the size of HTTP headers.
6 HOST The name of the application that is billed.
7 request_method The request method.
8 scheme://$host$request_uri The requested URL, which contains the protocol, domain name, port, path, and parameters after the question mark (?).
9 server_protocol The name and version of the protocol used by the server.
10 cache_status/$upstream_status The HTTP status code that is returned to the client if the TCP_HIT cache status code is 200.
11 sent_http_content_range The MIME content type, which is the value of Content-Type.
12 Referer The HTTP Referer (if any). The HTTP user agent, for example, a browser, usually sets the Referer header to the URL of the page that is linked to the resource requested.
13 User-Agent The HTTP user agent.

Note: If you have special requirements on the log format, contact Kingsoft Cloud technical support or sales.

Enable or disable the log management service

Log in to the Kingsoft Cloud CDN console and click Log Management in the left navigation pane. On the page that appears, select multiple domain names and click Open Service to enable the log management service for the domain names.
Click Close Service in the Operate column of a domain name to disable the log management service for the domain name.

Manage log files

Click Log Management in the Operate column of a domain name to view log files generated for the domain name in a period.

  • You can select or set a period to view log files of the domain name. The query time span cannot be greater than 31 days.
  • You can download or delete a log file.

57.jpg

On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback