Skip to main content
Get the logs
Last update:

Get the logs

You can get logs on requests to CDN resources:

View Selectel resource logs in the control panel

  1. In Control Panel, go to CDNLogs.

  2. Open the View Logs tab.

  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. To get logs for an earlier period, create an upload raw logs-to-object-storage-container.

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

  6. Press Apply. The page will display the main data for the period:

    • query time;
    • Client IP address;
    • HTTP request method;
    • cached-file-status;
    • CDN server response code;
    • CDN Resource.
  7. Optional: to download the data for the selected period in CSV format, click Export.

File statuses in the cache

HITFile given from cache
STALEFile is out of date because the source did not respond or responded incorrectly when the cache was updated
UPDATINGFile is out of date because the file is in the process of being updated after an earlier request
REVALIDATEDRunning the proxy_cache_revalidate directive determined that the file on the source has not changed
EXPIREDThe cache lifetime has expired, but the file matches the file on the source. Request sent to source for re-caching
MISSFile not given from cache, proxied from source

Upload logs to object storage container

Logs are uploaded to the object storage container as data files in .log format. Log storage is charged at payment model and object storage prices.

  1. In Control Panel, go to CDNLogs.
  2. Open the Log Offload tab.
  3. Click Create Upload.
  4. Specify the period for which you want to generate logs.
  5. Choose a provider — Akamai or Selectel.
  6. Optional: select the fields to be uploaded.
  7. If you want to upload logs for all personal domains, check the box Upload logs for all personal domains.
  8. If you want to upload logs for specific personal domains, uncheck the Upload logs for all personal domains checkbox and enter personal domains separated by commas.
  9. Select the log retention period — day, three days, week, month, or indefinitely.
  10. Select the object storage container to which the logs will be uploaded.
  11. Click Create Upload. It can take up to three days to upload logs, as it takes time to aggregate information from all CDN servers.

Log data in the upload

VariableExample valueDescription
timestamp2020-07-07T06:36:54ZRequest time
origin_hostorigin.example.comThe hostname of the content source
client_ip0.0.0.0User IP
hosta5d93d26-f978-4e0b-a070-83f1e43e542b.selcdn.netHost name of the CDN resource or request
server_to_client_bytes2884Number of bytes transferred to the user
http_methodGETHTTP request type
path/images/1.jpgRequested file path
status200Response code from edge server
refererhttps://example.com/images/5What URL the user came from
cache_statusHIT

Status of the requested file in the CDN cache:

  • HIT — the file was given from the cache;
  • STALE — the file is out of date because the source did not respond or responded incorrectly when
  • updating
  • the cache;
  • UPDATING — the file is in the process of being updated after an earlier request
  • ;
  • REVALIDATED — running the proxy_cache_revalidate directive determined that the file at the source has not changed;
  • EXPIRED — the cache lifetime has expired, but the file matches the file at the source. A request has been sent to the source for re-caching;
  • MISS — file not given from cache, proxied from source