Skip to main content
Logs of requests to the CDN resource
Last update:

Logs of requests to the CDN resource

You can obtain logs for requests to Selectel's CDN provider resources:

Obtaining logs for Akamai ISP resources is not yet available.

Cost

The logs that are stored in the control panel, available free of charge.

Cost log uploads to storage is 5000 ₽ per month. Log storage is charged separately according to the payment model and prices of your storage. To pay for uploading, depending on the type of balance in the account, a single balance or the balance of the storage and CDN is used. The service is paid monthly, when ordering the service the payment for the first month is deducted from the balance, further payments are deducted automatically on the first day of each month.

View logs in the control panel

In the dashboard, you can see the data for the last three days:

  • time of request to CDN resource;
  • Client IP address;
  • HTTP request method;
  • cached file status;
  • CDN server response code;
  • CDN resource.

  1. В control panels go to CDNLogs.

  2. Open the tab View logs.

  3. Select the resource for which you want to view logs. To view logs for all Selectel resources, select All resources.

  4. Specify the beginning of the period for which you want to view logs — date and time, maximum three days from the current date.

  5. Select the length of the period — 30 minutes, 1, 3 or 6 hours.

  6. Click Apply.

  7. Optional: to download data for the selected period in CSV format, press Exports.

Connect log upload to storage

Logs can be uploaded to Selectel object storage or any available storage like S3, FTP or SFTP.

Logs are uploaded as files with data formats .log. The file is uploaded at the end of each hour. If the CDN servers have not received any requests during the hour, an empty file of about 20 bytes will be uploaded to the storage.

To connect the upload, file a ticket.

Log data in the upload

VariableExample of a valueDescription
remote_addr0.0.0.0user IP
time_local[26/Apr/2019:09:47:40 +0000]Request time
requestGET /ContentCommon/images/image.png HTTP/1.1HTTP request type, file path, HTTP version
status200Response code from CDN server
bytes_sent1514283Number of bytes transferred to the user
body_bytes_sent1514283Number of bytes transferred to the user, not including the response header
http_refererhttps://example.com/videos/10What URL the user came from
http_user_agentMozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1)The type of client through which the user requested the content
edgename[dh-up-gc18]The name of the CDN server that responded to the request
schemehttpsRequest protocol — HTTP or HTTPS
hostcdn.example.comThe hostname of the content source hostname from the request
request_time1.500Request processing time in seconds: from the moment the first bytes of the request are read from the client to the moment the request is logged
upstream_response_time0.445Source response time in seconds
request_length157Request length
http_rangebytes=0-1901653File fragment size at range-request
upstream_cache_statusHIT

Status of the requested file in the CDN cache

upstream_response_length10485760Length of the response from the source in bytes
upstream_addr203.0.113.0:80Source IP address and port
geoip_country_codeKZUser country code
geoip_city-User city code
upstream_status206Source response code
upstream_connect_time0.000Connection time to the source in seconds
upstream_header_time0.200Time to receive response headers from the source in seconds
http_x_forwarded_protohttpThe initial protocol of the incoming request is HTTP or HTTPS
sent_http_content_typeapplication/jsonContent-Type HTTP header value indicating the MIME type of the transmitted resource
real_tcpinfo_rtt11863Average packet transfer time to and from the server
http_x_forwarded_http_verHTTP/1.1HTTP version in the user request

File statuses in the cache

HITThe file was given from the cache
STALEThe file is out of date because the source did not respond or responded incorrectly when the cache was updated
UPDATINGThe file is out of date because the file is in the process of being updated after a previous request was received
REVALIDATEDThe result of running the proxy_cache_revalidate directive is that the file on the source has not changed
EXPIREDThe cache lifetime has expired, but the file matches the file from the source. A request has been sent to the source for re-caching
MISSThe file is not given from the cache, it is proxied from the source
BYPASSCDN server requested a file for the first time after clearing the cache