This topic describes the log fields for Object Storage Service (OSS).
OSS log types
Log type | Description |
Access log |
|
Metering log |
|
Monitoring metrics |
|
Access log
Field | Description |
__topic__ | The log topic. The value is fixed to oss_access_log. |
time | The time when the OSS request ended, for example, 27/Feb/2018:13:58:45. If you need a timestamp, use the __time__ field. |
access_id | The AccessKey ID of the requester. |
owner_id | The Alibaba Cloud account ID of the OSS bucket owner. |
user_agent | The User-Agent header of the HTTP request, for example, curl/7.15.5. |
logging_flag | Indicates whether the feature that periodically exports logs to an OSS bucket is enabled. A value of true indicates that the feature is enabled. |
bucket | The name of the OSS bucket. |
content_length_in | The value of Content-Length in the request header. Unit: bytes. |
content_length_out | The value of Content-Length in the response header. Unit: bytes. |
object | The requested OSS object. The object is URL encoded. When you query the object, you can run |
object_size | The size of the OSS object. Unit: bytes. |
operation | The access type. For more information, see Appendix: Access types. |
bucket_location | The data center where the OSS bucket is located. The format is usually |
request_uri | The URI of the HTTP request, including the query string. The URI is URL encoded. When you query the URI, you can run |
error_code | The error code returned by OSS. For more information, see Error codes. |
request_length | The size of the HTTP request, including the header. Unit: bytes. |
client_ip | The IP address from which the request is initiated. This can be the IP address of the client, its network firewall, or a proxy. |
response_body_length | The size of the body in the HTTP response, excluding the header. |
http_method | The HTTP request method. |
referer | The HTTP Referer of the request. |
requester_id | The ID of the requester. If the access is anonymous, a hyphen (-) is displayed. |
request_id | The request ID. |
response_time | The HTTP response time. Unit: milliseconds. |
server_cost_time | The time that the OSS server takes to process the request. Unit: milliseconds. |
http_type | The HTTP request type. Valid values: HTTP and HTTPS. |
sign_type | The signature type.
|
http_status | The status returned for the HTTP request. |
sync_request | The synchronization request type.
|
bucket_storage_type | The storage class of the OSS object.
|
host | The endpoint used for the request, for example, bucket123.oss-cn-beijing.aliyuncs.com. |
vpc_addr | The Havip address of the VPC where OSS is located. This address is an integer, for example, 343819108. You can run |
vpc_id | The ID of the VPC where OSS is located. |
delta_data_size | The change in the size of the OSS object. If the size does not change, the value is 0. If the request is not an upload request, a hyphen (-) is returned. |
ec | The detailed error code. For more information about how to troubleshoot issues based on ECs, see Troubleshoot issues based on ECs. |
acc_access_region | If the request is a transfer acceleration request, this field indicates the region of the access point. Otherwise, a hyphen (-) is returned. |
restore_priority | The restoration priority. |
extend_information | An extended field. The default value is a hyphen (-). If a request is initiated using a RAM role, the log records the information about the RAM role. The information is concatenated in the |
user_defined_log_fields | An extended field. The default value is a hyphen (-). If you configure custom headers and parameters for the bucket, the log records the information about the matching headers and parameters. The value is the Base64 encoding of a JSON field. |
archive_direct_read_size | The billed size for real-time access of Archive objects generated by the request. If real-time access of Archive objects is not used, a hyphen (-) is returned. Unit: bytes. |
Metering log
Field | Description |
__topic__ | The log topic. The value is fixed to oss_metering_log. |
owner_id | The Alibaba Cloud account ID of the OSS bucket owner. |
bucket | The name of the OSS bucket. |
cdn_in | The inbound traffic from CDN. Unit: bytes. |
cdn_out | The outbound traffic to CDN. Unit: bytes. |
metering_datasize | The size of the metered data for non-Standard storage classes. |
get_request | The number of GET requests. |
intranet_in | The inbound traffic over the internal network. Unit: bytes. |
intranet_out | The outbound traffic over the 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 storage usage of the OSS bucket. Unit: bytes. |
storage_type | The storage class of the OSS bucket.
|
process_img_size | The size of the processed image. Unit: bytes. |
sync_in | The inbound traffic for synchronization. Unit: bytes. |
sync_out | The outbound traffic for synchronization. Unit: bytes. |
start_time | The start timestamp of the metering. Unit: seconds. |
end_time | The end timestamp of the metering. Unit: seconds. |
region | The region where the OSS bucket is located. |
process_img | The processed image. |
bucket_location | The data center where the OSS bucket is located. The format is usually oss-<region ID>. |
standard_total | Standard - Total physical capacity. Unit: bytes. |
standard_lrs | Standard - Locally redundant storage - Physical capacity. Unit: bytes. |
standard_zrs | Standard - Zone-redundant storage - Physical capacity. Unit: bytes. |
ia_total | IA storage class - Total physical capacity. Unit: bytes. |
ia_lrs | IA storage class - Locally redundant storage - Physical capacity. Unit: bytes. |
ia_zrs | IA storage class - Zone-redundant storage - Physical capacity. Unit: bytes. |
ia_total_charged_datasize | IA storage class - Total billable storage usage. Unit: bytes. |
ia_lrs_charged_datasize | IA storage class - Locally redundant storage - Billable storage usage. Unit: bytes. |
ia_zrs_charged_datasize | IA storage class - Zone-redundant storage - Billable storage usage. Unit: bytes. |
archive_total | Archive Storage - Total physical capacity. Unit: bytes. |
archive_lrs | Archive Storage - Locally redundant storage - Physical capacity. Unit: bytes. |
archive_zrs | Archive Storage - Zone-redundant storage - Physical capacity. Unit: bytes. |
archive_total_charged_datasize | Archive Storage - Total billable storage usage. Unit: bytes. |
archive_lrs_charged_datasize | Archive Storage - Locally redundant storage - Billable storage usage. Unit: bytes. |
archive_zrs_charged_datasize | Archive Storage - Zone-redundant storage - Billable storage usage. Unit: bytes. |
coldarchive_total | Cold Archive - Total physical capacity. Unit: bytes. |
coldarchive_lrs | Cold Archive - Locally redundant storage - Physical capacity. Unit: bytes. |
coldarchive_total_charged_datasize | Cold Archive - Total billable storage usage. Unit: bytes. |
coldarchive_lrs_charged_datasize | Cold Archive - Locally redundant storage - Billable storage usage. Unit: bytes. |
deepcoldarchive_total | Deep Cold Archive - Total physical capacity. Unit: bytes. |
deepcoldarchive_lrs | Deep Cold Archive - Locally redundant storage - Physical capacity. Unit: bytes. |
deepcoldarchive_total_charged_datasize | Deep Cold Archive - Total billable storage usage. Unit: bytes. |
deepcoldarchive_lrs_charged_datasize | Deep Cold Archive - Locally redundant storage - Billable storage usage. Unit: bytes. |
reserved_capacity | Reserved capacity - Total used capacity. Unit: bytes. |
reserved_capacity_lrs | Reserved capacity - Locally redundant storage - Used capacity. Unit: bytes. |
reserved_capacity_zrs | Reserved capacity - Zone-redundant storage - Used capacity. Unit: bytes. |
total_storage | Total physical capacity. Unit: bytes. |
total_storage_charged_datasize | Total billable storage usage (excluding Standard storage). Unit: bytes. |
Batch delete log
When you call the DeleteObjects operation, a request record is generated in the access log. However, because the information about the deleted files is stored in the HTTP request body, the value of the object field in the access log is a hyphen (-). To view the list of deleted files, you must check the batch delete log. The following table describes the fields of a batch delete log. You can associate the batch delete log with the access log using the request_id field.
Field name | Description |
__topic__ | The log topic. The value is fixed to oss_batch_delete_log. |
bucket | The name of the OSS bucket. |
bucket_location | The data center where the OSS bucket is located. The format is oss-<region ID>. |
client_ip | The IP address from which the request is initiated. This can be the IP address of the client, its network firewall, or a proxy. |
delta_data_size | The change in the size of the OSS object. If the size does not change, the value is 0. If the request is not an upload request, a hyphen (-) is returned. |
error_code | The error code returned by OSS. For more information, see Error codes. |
host | The endpoint used for the request, for example, bucket123.oss-cn-beijing.aliyuncs.com. |
http_method | The HTTP request method, for example, POST. |
http_status | The status returned for the HTTP request. |
logging_flag | Indicates whether the feature that periodically exports logs to an OSS bucket is enabled. A value of true indicates that the feature is enabled. |
object | The requested OSS object. The object is URL encoded. When you query the object, you can run |
object_size | The size of the OSS object. This corresponds to the size of the requested object. Unit: bytes. |
operation | The access type. For more information, see Log field details . |
owner_id | The Alibaba Cloud account ID of the OSS bucket owner. |
response_body_length | The size of the HTTP response body, excluding the header. |
request_length | The size of the HTTP request, including the header. Unit: bytes. |
referer | The HTTP Referer of the request. |
request_id | The request ID. |
requester_id | The ID of the requester. If the access is anonymous, a hyphen (-) is returned. |
request_uri | The URI of the request, including the query string. The URI is URL encoded. When you query the URI, you can run |
sync_request | The synchronization request type.
|
server_cost_time | The time that the OSS server takes to process the request. Unit: milliseconds. |
user_agent | The User-Agent header of the HTTP request, for example, curl/7.15.5. |
Monitoring metrics
The metrics described in this topic follow the metric data format. You can use Prometheus Query Language (PromQL) or SQL to query and analyze the metrics. For more information, see Introduction to metric query and analysis.
Metric | Unit | Description | Labels |
private_net_in_traffic_10s | byte | Inbound traffic over the internal network per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
private_net_out_traffic_10s | byte | Outbound traffic over the internal network per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
public_net_in_traffic_10s | byte | Inbound traffic over the Internet per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
public_net_out_traffic_10s | byte | Outbound traffic over the Internet per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
cdn_in_10s | byte | Inbound traffic from CDN per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
cdn_out_10s | byte | Outbound traffic to CDN per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
sync_in_10s | byte | Inbound traffic for synchronization requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
sync_out_10s | byte | Outbound traffic for synchronization requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
request_cnt_total_10s | Count | Total number of requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
write_qps_10s | Count | Number of billable PUT, POST, and HEAD requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
read_qps_10s | Count | Number of billable GET requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
error_4xx_10s | Count | Number of 4xx requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
error_403_10s | Count | Number of 403 requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
error_404_10s | Count | Number of 404 requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
error_408_10s | Count | Number of 408 requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
error_499_10s | Count | Number of 499 requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
error_5xx_10s | Count | Number of 5xx requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
error_503_10s | Count | Number of 503 requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
success_2xx_10s | Count | Number of 2xx requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
success_203_10s | Count | Number of 203 requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
success_3xx_10s | Count | Number of 3xx requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
client_latency_10s | millsecond | Client-side latency per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
server_latency_10s | millsecond | Server-side latency per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
request_cnt_level4_10s | Count | Number of requests per 10 seconds for files larger than 1 MB. | owner_id, region, bucket, storage_type, operation, sync_type |
client_latency_level4_10s | millsecond | Client-side latency per 10 seconds for files larger than 1 MB. | owner_id, region, bucket, storage_type, operation, sync_type |
server_latency_level4_10s | millsecond | Server-side latency per 10 seconds for files larger than 1 MB. | owner_id, region, bucket, storage_type, operation, sync_type |
request_cnt_level2_10s | Count | Number of requests per 10 seconds for files that are 100 KB to 200 KB in size. | owner_id, region, bucket, storage_type, operation, sync_type |
client_latency_level2_10s | millsecond | Client-side latency per 10 seconds for files that are 100 KB to 200 KB in size. | owner_id, region, bucket, storage_type, operation, sync_type |
server_latency_level2_10s | millsecond | Server-side latency per 10 seconds for files that are 100 KB to 200 KB in size. | owner_id, region, bucket, storage_type, operation, sync_type |
request_cnt_level1_10s | Count | Number of requests per 10 seconds for files smaller than 100 KB. | owner_id, region, bucket, storage_type, operation, sync_type |
client_latency_level1_10s | millsecond | Client-side latency per 10 seconds for files smaller than 100 KB. | owner_id, region, bucket, storage_type, operation, sync_type |
server_latency_level1_10s | millsecond | Server-side latency per 10 seconds for files smaller than 100 KB. | owner_id, region, bucket, storage_type, operation, sync_type |
request_cnt_level3_10s | Count | Number of requests per 10 seconds for files that are 200 KB to 1 MB in size. | owner_id, region, bucket, storage_type, operation, sync_type |
client_latency_level3_10s | millsecond | Client-side latency per 10 seconds for files that are 200 KB to 1 MB in size. | owner_id, region, bucket, storage_type, operation, sync_type |
server_latency_level3_10s | millsecond | Server-side latency per 10 seconds for files that are 200 KB to 1 MB in size. | owner_id, region, bucket, storage_type, operation, sync_type |
error_timeout_10s | Count | Number of timed-out requests per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
delta_add_10s | byte | Storage increment per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
delta_del_10s | byte | Storage decrement per 10 seconds. | owner_id, region, bucket, storage_type, operation, sync_type |
top_object_pv_5m | Count | Number of visits to top files per 5 minutes. | owner_id, region, bucket, storage_type, object |
top_object_bandwidth_out_5m | byte | Outbound traffic of top files per 5 minutes. | owner_id, region, bucket, storage_type, object |
top_object_bandwidth_in_5m | byte | Inbound traffic of top files per 5 minutes. | owner_id, region, bucket, storage_type, object |
top_ip_method_pv_5m | Count | Number of visits from top IP addresses per 5 minutes. | owner_id, region, bucket, storage_type, operation, client_ip |
top_ip_method_bandwidth_out_5m | byte | Outbound traffic from top IP addresses per 5 minutes. | owner_id, region, bucket, storage_type, operation, client_ip |
top_ip_method_bandwidth_in_5m | byte | Inbound traffic from top IP addresses per 5 minutes. | owner_id, region, bucket, storage_type, operation, client_ip |
top_ip_storage_pv_5m | Count | Number of visits from top IP addresses per 5 minutes. | owner_id, region, bucket, storage_type, client_ip |
top_ip_storage_bandwidth_out_5m | byte | Outbound traffic from top IP addresses per 5 minutes. | owner_id, region, bucket, storage_type, client_ip |
top_ip_storage_bandwidth_in_5m | byte | Inbound traffic from top IP addresses per 5 minutes. | owner_id, region, bucket, storage_type, client_ip |
top_refer_pv_5m | Count | Number of visits from top referers per 5 minutes. | owner_id, region, bucket, storage_type, refer |
The following table describes the label fields.
Label field | Description |
owner_id | The Alibaba Cloud account ID of the OSS bucket owner. |
region | The region where the OSS bucket is located. |
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 access type. For more information, see Appendix: Access types. |
sync_type | The synchronization type. |
client_ip | The source IP address of the access request. |
refer | The HTTP Referer of the request. |
Appendix: Access types
The following table describes the access types. For more information, see API overview.
Operation | Description |
AbortMultiPartUpload | Aborts a multipart upload. |
AppendObject | Append data by uploading a file. |
CompleteUploadPart | You can complete the breakpoint upload. |
CopyObject | You can copy the file. |
DeleteBucket | Deletes a bucket. |
DeleteLiveChannel | Deletes a LiveChannel. |
DeleteObject | Deletes an object. |
DeleteObjects | Deletes multiple objects. |
ExpireObject | Deletes an expired object. |
GetBucket | Lists objects. |
GetBucketAcl | Gets the access control list (ACL) of a bucket. |
GetBucketCors | Queries the cross-origin resource sharing (CORS) rules of a bucket. |
GetBucketEventNotification | Gets the notification configurations of a bucket. |
GetBucketInfo | Queries the information about a bucket. |
GetBucketLifecycle | Queries the lifecycle configuration of a bucket. |
GetBucketLocation | Queries the region of a bucket. |
GetBucketLog | Queries the access log configuration of a bucket. |
GetBucketReferer | Queries the hotlink protection settings of a bucket. |
GetBucketReplication | Queries the cross-region replication (CRR) configuration. |
GetBucketReplicationProgress | Queries the CRR progress. |
GetBucketStat | Gets the information about a bucket. |
GetBucketWebSite | Queries the static website hosting status of a bucket. |
get_image_exif | Gets the EXIF information of an image. |
get_image_info | Gets the information about an image, such as its height and width. |
get_image_infoexif | Gets the height, width, and EXIF information of an image. |
GetLiveChannelStat | Gets the status information of a LiveChannel. |
GetObject | You can read the file. |
GetObjectAcl | You can obtain file access permissions. |
GetObjectInfo | Gets the information about an object. |
GetObjectMeta | You can view the file information. |
GetObjectSymlink | Gets the details of a symbolic link file. |
GetPartData | Gets the data of a part in a multipart upload. |
GetPartInfo | Gets the information about a part in a multipart upload. |
GetProcessConfiguration | Gets the image processing configuration of a bucket. |
GetService | Lists buckets. |
get_style | Gets a bucket style. |
HeadBucket | Queries the information about a bucket. |
HeadObject | You can view file information. |
InitiateMultipartUpload | Initiates a multipart upload. |
ListMultiPartUploads | You can list breakpoint events. |
ListParts | Lists the status of parts in a multipart upload. |
list_style | Lists the styles of a bucket. |
PostObject | Uploads an object using a form. |
PostProcessTask | Submits a data processing task, such as taking a screenshot. |
PostVodPlaylist | Creates a video-on-demand (VOD) playlist for a LiveChannel. |
ProcessImage | Processes an image. |
PutBucket | Creates a bucket. |
PutBucketCors | Configures the CORS rules for a bucket. |
PutBucketLifecycle | Configures the lifecycle rules for a bucket. |
PutBucketLog | Configures access logs for a bucket. |
PutBucketWebSite | Configures the static website hosting mode for a bucket. |
PutLiveChannel | Creates a LiveChannel. |
PutLiveChannelStatus | Sets the status of a LiveChannel. |
PutObject | You can upload files. |
PutObjectAcl | You can modify file access permissions. |
PutObjectSymlink | Creates a symbolic link file. |
put_style | Creates a bucket style. |
RedirectBucket | Redirects a bucket endpoint. |
RestoreObject | You can restore the file. |
UploadPart | You can upload a file using breakpoints. |
UploadPartCopy | Copies a part. |