All Products
Search
Document Center

Simple Log Service:Log fields

Last Updated:Jul 05, 2024

This topic describes the fields in Object Storage Service (OSS) logs.

OSS log types

Log type

Description

Detailed access logs

  • You must manually enable the log collection feature for detailed access logs. For more information, see Enable the log collection feature.

  • Detailed access logs include all access logs and logs that record the batch delete operations performed on your OSS buckets. Detailed access logs are collected in real time.

    Note
    • When you call the DeleteObjects operation, an access log is generated to record the request.

    • The oss-log-store Logstore may store both detailed access logs and hourly metering logs. Hourly metering logs are different from the following metering logs. The _topic_:oss_access_log field indicates detailed access logs, and the _topic_:oss_metering_log field indicates hourly metering logs.

Metering logs

  • The log collection feature for metering logs is automatically enabled free of charge.

  • This type of log records hourly metering data for a specified OSS bucket. The point in time at which a metering log is collected to Simple Log Service is several hours later than the point in time at which the metering log is generated. Metering logs are used to support analysis.

Metrics

  • The log collection feature for metrics is automatically enabled free of charge.

  • Metrics related to requests, latencies, and traffic are recorded at a granularity of 10 seconds. Metrics related to requests and traffic can also be recorded at a granularity of 5 minutes.

Detailed access logs

Field

Description

time

The time at which OSS receives the request. Example: 27/Feb/2018:13:58:45.

If you need a timestamp, you can use the __time__ field.

access_id

The AccessKey ID of the requester.

owner_id

The ID of the Alibaba Cloud account to which the OSS bucket belongs.

user_agent

The User-Agent header of the HTTP request. Example: curl/7.15.5.

logging_flag

Indicates whether logging is enabled to export logs to an OSS bucket at regular intervals. A value of true indicates that the feature is enabled.

bucket

The name of the OSS bucket.

content_length_in

The value of the Content-Length header in the request. Unit: bytes.

content_length_out

The value of the Content-Length header in the response. Unit: bytes.

object

The URL-encoded object that is requested.

You can include select url_decode(object) in your query statement to decode the object.

object_size

The size of the object. Unit: bytes.

operation

The API operation. For more information, see Appendix: Access types.

bucket_location

The data center where the OSS bucket resides. The value is in the oss-<Region ID> format.

request_uri

The URL-encoded URI of the HTTP request. The query string is included.

You can include select url_decode(request_uri) in your query statement to decode the URI.

error_code

The error code that is returned by OSS. For more information, see Overview.

request_length

The size of the HTTP request. The headers of the request are counted. Unit: bytes.

client_ip

The IP address from which the request is sent. The IP address can be the IP address of a client, firewall, or proxy.

response_body_length

The size of the HTTP response body.

http_method

The HTTP request method.

referer

The Referer header of the HTTP request.

requester_id

The ID of the requester. If the request is sent by an anonymous user, the value of this field is a hyphen (-).

request_id

The request ID.

response_time

The HTTP response time. Unit: milliseconds.

server_cost_time

The time that is consumed by the OSS server to process the request. Unit: milliseconds.

http_type

The protocol over which the request is sent. Valid values: HTTP and HTTPS.

sign_type

The type of the signature. Valid values:

  • NotSign: The request is not signed.

  • NormalSign: The request is signed by using a regular signature.

  • UriSign: The request is signed by using a URL signature.

  • AdminSign: The request is signed by using an administrator account.

http_status

The HTTP status code.

sync_request

The type of the synchronization request. Valid values:

  • hyphen (-): general request

  • cdn: Alibaba Cloud CDN back-to-origin request

  • sync-public: cross-region replication request

  • lifecycle: lifecycle rule configuration request

bucket_storage_type

The storage class of the OSS object. Valid values:

  • standard: the Standard storage class

  • archive: the Archive storage class

  • IA: the Infrequent Access (IA) storage class

host

The endpoint of the OSS bucket. Example: bucket123.oss-cn-beijing.aliyuncs.com.

vpc_addr

The high-availability virtual IP address (HAVIP) of the virtual private cloud (VPC) to which the OSS bucket belongs.

Data type: integer. Example: 343819108. You can convert the VIP to an IP address by using the int_to_ip(cast(vpc_addr as bigint)) function.

vpc_id

The ID of the VPC.

delta_data_size

The change to the size of an OSS object. If the object size does not change, the value of this field is 0. If the request is not an upload request, the value of this field is a hyphen (-).

acc_access_region

The region of the OSS endpoint that is specified in the request. If the request is sent when the transfer acceleration feature is enabled, the value of this field is the name of the region. If the request is sent when the transfer acceleration feature is disabled, the value of this field is a hyphen (-).

restore_priority

The priority of the log in the event of log data restoration.

extend_information

The extended fields. Default value: hyphen (-).

If the request is initiated by using a RAM role, the log records the information about the RAM role. The information is in the requesterParentId,roleName,roleSessionName,roleOwnerId format. The fields in the information are separated with commas (,). New fields can be added to the information.

user_defined_log_fields

The extended fields. Default value: hyphen (-).

If you have configured custom headers and parameters for the OSS bucket, the log records the values of the headers and parameters in the JSON format in this field. The value of this field is encoded by using the Base64 algorithm.

archive_direct_read_size

The size of the metering data that is read from Archive objects based on real-time access. If real-time access to Archive objects is disabled, the value is a hyphen (-). Unit: bytes.

ec

The error code. For more information about how to handle error codes, see Overview.

target_storage_class

The storage class of the OSS object after storage class conversion. For example, if the storage class of an OSS object is changed from Standard to Archive, the value of this field is archive.

Metering logs

Field

Description

owner_id

The ID of the Alibaba Cloud account to which the OSS bucket belongs.

bucket

The name of the OSS bucket.

cdn_in

The inbound traffic from Alibaba Cloud CDN to the OSS bucket. Unit: bytes.

cdn_out

The outbound traffic from the OSS bucket to Alibaba Cloud CDN. Unit: bytes.

metering_datasize

The amount of data whose storage class is not Standard in the OSS bucket.

get_request

The number of GET requests.

intranet_in

The inbound traffic over an internal network. Unit: bytes.

intranet_out

The outbound traffic over an internal network. Unit: bytes.

network_in

The inbound traffic over the Internet. Unit: bytes.

network_out

The outbound traffic over the Internet. Unit: bytes.

put_request

The number of PUT requests.

storage

The amount of data in the OSS bucket. Unit: bytes.

storage_type

The storage class of the OSS bucket. Valid values:

  • standard: the Standard storage class

  • archive: the Archive storage class

  • IA: the IA storage class

process_img_size

The size of the image that is processed. Unit: bytes.

sync_in

The inbound traffic that is generated by the synchronization operation. Unit: bytes.

sync_out

The outbound traffic that is generated by the synchronization operation. Unit: bytes.

start_time

The start timestamp of the metering operation. Unit: seconds.

end_time

The end timestamp of the metering operation. Unit: seconds.

region

The region where the OSS bucket resides.

process_img

The information about the image that is processed.

bucket_location

The data center where the OSS bucket resides. The value is in the oss-<Region ID> format.

metering_datasize_ca

The size of the metering data that is stored in Cold Archive objects.

metering_datasize_zrs

The size of the metering data that is stored in IA or Zone-redundant storage (ZRS) objects.

metering_datasize_zrsii

The reserved field.

Metrics

In the following table, the metrics follow the time series format. For more information about the format, see Metric. You can query and analyze the metrics by using the PromQL or SQL syntax. For more information about the syntax, see Overview of query and analysis on metric data.

Metric

Unit

Description

Tag

private_net_in_traffic_10s

byte

The inbound traffic over an internal network at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

private_net_out_traffic_10s

byte

The outbound traffic over an internal network at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

public_net_in_traffic_10s

byte

The inbound traffic over the Internet at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

public_net_out_traffic_10s

byte

The outbound traffic over the Internet at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

cdn_in_10s

byte

The inbound traffic from Alibaba Cloud CDN to the OSS bucket at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

cdn_out_10s

byte

The outbound traffic from the OSS bucket to Alibaba Cloud CDN at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

sync_in_10s

byte

The inbound traffic of synchronization requests at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

sync_out_10s

byte

The outbound traffic of synchronization requests at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

request_cnt_total_10s

Count

The total number of requests at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

write_qps_10s

Count

The number of billed PUT, POST, and HEAD requests at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

read_qps_10s

Count

The number of billed GET requests at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

error_4xx_10s

Count

The number of requests whose status code is 4xx at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

error_403_10s

Count

The number of requests whose status code is 403 at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

error_404_10s

Count

The number of requests whose status code is 404 at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

error_408_10s

Count

The number of requests whose status code is 408 at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

error_499_10s

Count

The number of requests whose status code is 499 at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

error_5xx_10s

Count

The number of requests whose status code is 5xx at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

error_503_10s

Count

The number of requests whose status code is 503 at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

success_2xx_10s

Count

The number of requests whose status code is 2xx at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

success_203_10s

Count

The number of requests whose status code is 203 at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

success_3xx_10s

Count

The number of requests whose status code is 3xx at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

client_latency_10s

millsecond

The client latency at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

server_latency_10s

millsecond

The server latency at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

request_cnt_level4_10s

Count

The number of requests that involve files greater than 1 MB in size.at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

client_latency_level4_10s

millsecond

The latency of the client that sends a request involving files greater than 1 MB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

server_latency_level4_10s

millsecond

The latency of the server that receives a request involving files greater than 1 MB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

request_cnt_level2_10s

Count

The number of requests that involve files from 100 KB to 200 KB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

client_latency_level2_10s

millsecond

The latency of the client that sends a request involving files from 100 KB to 200 KB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

server_latency_level2_10s

millsecond

The latency of the server that receives a request involving files from 100 KB to 200 KB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

request_cnt_level1_10s

Count

The number of requests that involve files less than 100 KB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

client_latency_level1_10s

millsecond

The latency of the client that sends a request involving files less than 100 KB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

server_latency_level1_10s

millsecond

The latency of the server that receives a request involving files less than 100 KB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

request_cnt_level3_10s

Count

The number of requests that involve files from 200 KB to 1 MB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

client_latency_level3_10s

millsecond

The latency of the client that sends a request involving files from 200 KB to 1 MB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

server_latency_level3_10s

millsecond

The latency of the server that receives a request involving files from 200 KB to 1 MB in size at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

error_timeout_10s

Count

The number of timeout requests at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

delta_add_10s

byte

The storage increment at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

delta_del_10s

byte

The storage decrement at 10-second intervals.

owner_id, region, bucket, storage_type, operation, and sync_type

top_object_pv_5m

Count

The number of access requests to top files at 5-minute intervals.

owner_id, region, bucket, storage_type, and object

top_object_bandwidth_out_5m

byte

The outbound traffic of top files at 5-minute intervals.

owner_id, region, bucket, storage_type, and object

top_object_bandwidth_in_5m

byte

The inbound traffic of top files at 5-minute intervals.

owner_id, region, bucket, storage_type, and object

top_ip_method_pv_5m

Count

The number of access requests to top IP addresses at 5-minute intervals.

owner_id, region, bucket, storage_type, operation, and client_ip

top_ip_method_bandwidth_out_5m

byte

The outbound traffic of top IP addresses at 5-minute intervals.

owner_id, region, bucket, storage_type, operation, and client_ip

top_ip_method_bandwidth_in_5m

byte

The inbound traffic of top IP addresses at 5-minute intervals.

owner_id, region, bucket, storage_type, operation, and client_ip

top_ip_storage_pv_5m

Count

The number of access requests to top IP addresses at 5-minute intervals.

owner_id, region, bucket, storage_type, and client_ip

top_ip_storage_bandwidth_out_5m

byte

The outbound traffic of top IP addresses at 5-minute intervals.

owner_id, region, bucket, storage_type, and client_ip

top_ip_storage_bandwidth_in_5m

byte

The inbound traffic of top IP addresses at 5-minute intervals.

owner_id, region, bucket, storage_type, and client_ip

top_refer_pv_5m

Count

The number of access requests that use top referers at 5-minute intervals.

owner_id, region, bucket, storage_type, and refer

The following table describes the tag fields.

Tag field

Description

owner_id

The ID of the Alibaba Cloud account to which the OSS bucket belongs.

region

The region where the OSS bucket resides.

bucket

The name of the OSS bucket.

object

The name of the OSS object.

storage_type

The storage class of the OSS bucket.

operation

The API operation. For more information, see Appendix: Access types.

sync_type

The synchronization type.

client_ip

The source IP address of the request.

refer

The HTTP referer of the request.

Appendix: Access types

The following table describes the supported API operations. For more information, see List of operations by function.

Operation

Description

AbortMultiPartUpload

Cancels a multipart upload task.

AppendObject

Appends an object to an existing object.

CompleteUploadPart

Completes the multipart upload tasks of an object.

CopyObject

Copies an object.

DeleteBucket

Deletes a bucket.

DeleteLiveChannel

Deletes a LiveChannel.

DeleteObject

Deletes an object.

DeleteObjects

Deletes multiple objects.

GetBucket

Queries the information about all objects in a bucket.

GetBucketAcl

Queries the access control list (ACL) of a bucket.

GetBucketCors

Queries the cross-origin resource sharing (CORS) rules of a bucket.

GetBucketEventNotification

Queries the notification configurations of a bucket.

GetBucketInfo

Queries the information about a bucket.

GetBucketLifecycle

Queries the lifecycle rules that are configured for the objects in a bucket.

GetBucketLocation

Queries the region where a bucket resides.

GetBucketLog

Queries the access logging configurations of a bucket.

GetBucketReferer

Queries the hotlink protection rules that are configured for a bucket.

GetBucketReplication

Queries the cross-region replication (CRR) rules that are configured for a bucket.

GetBucketReplicationProgress

Queries the progress of a CRR task that is performed on a bucket.

GetBucketStat

Queries the information about a bucket.

GetBucketWebSite

Queries the status of static website hosting for a bucket.

GetLiveChannelStat

Queries the status of a LiveChannel.

GetObject

Queries an object.

GetObjectAcl

Queries the ACL of an object.

GetObjectInfo

Queries the information about an object.

GetObjectMeta

Queries the metadata of an object.

GetObjectSymlink

Queries the symbolic link of an object.

GetPartData

Queries the data in all parts of an object.

GetPartInfo

Queries the information about all parts of an object.

GetProcessConfiguration

Queries the image processing configurations of a bucket.

GetService

Queries all buckets.

HeadBucket

Queries the information about a bucket.

HeadObject

Queries the metadata of an object.

InitiateMultipartUpload

Initializes a multipart upload task.

ListMultiPartUploads

Queries all multipart upload tasks in progress.

ListParts

Queries all the parts that are uploaded in a specified multipart upload task.

PostObject

Uploads an object by using an HTML form.

PostProcessTask

Commits data processing operations, such as screenshot.

PostVodPlaylist

Creates a playlist for a LiveChannel.

ProcessImage

Processes an image.

PutBucket

Creates a bucket.

PutBucketCors

Configures CORS rules for a bucket.

PutBucketLifecycle

Configures lifecycle rules for a bucket.

PutBucketLog

Configures access logging for a bucket.

PutBucketWebSite

Configures the static website hosting mode for a bucket.

PutLiveChannel

Creates a LiveChannel.

PutLiveChannelStatus

Configures the status of a LiveChannel.

PutObject

Uploads an object.

PutObjectAcl

Modifies the ACL of an object.

PutObjectSymlink

Creates a symbolic link for an object.

RedirectBucket

Redirects a request to a bucket endpoint.

RestoreObject

Restores an object.

UploadPart

Uploads an object by part.

UploadPartCopy

Copies data from an existing object to upload a part.

get_image_exif

Queries the EXIF data of an image.

get_image_info

Queries the length and width of an image.

get_image_infoexif

Queries the length, width, and EXIF data of an image.

get_style

Queries a style of a bucket.

list_style

Queries all styles of a bucket.

put_style

Creates a style for a bucket.