A large number of access logs are generated during the access Object Storage Service (OSS). This topic describes how to use the log transfer feature to query the access and operation records of objects.
You can view the access and operation records of objects by using offline log query and real-time log query. The specific methods are as follows:
Method 1: Query offline logs
- To find the access records of OSS objects, you must enable the OSS logging feature. For more information about how to enable the log storage feature, see Set log storage.
- OSS logs can record the time period during which objects are accessed. You can find the operation records of objects in the logs during this time period. The object file is accessed from which IP address and which request type is used based on the following two fields and time:
Description: For more information about the log file format and OSS access log entry, see Access log storage.
- Remote IP: records the IP address of the guest that initiates the request.
- Operation: the type of request that records access.
Method 2: Query real-time logs
The real-time log query feature combines OSS with Log Service. You can directly query OSS access logs in the OSS console and view the access and operation records of objects:
- Log on to the OSS console.
- Click Buckets and then click the name of the target bucket.
- Click Real-time log query.
to analyze the logs. For more information, see
- Raw Logs: You can specify a time range and query statements to query raw logs in real time. For example, you can quickly analyze the distribution of a field (such as an API operation name) over a period of time. You can also filter or count the access records and operation records of objects that you want to view by condition.
- Log Report: The log report provides four out-of-the-box reports. You can analyze logs through the access center, audit center, O&M center, and performance center.