Details for Object Storage

Logging details for Object Storage logs.

Resources

  • buckets

Log Categories

API value (ID): Console (Display Name) Description
write Write Access Events Includes logs for write events.
read Read Access Events Includes logs for read events.

Availability

Object Storage logging is available in all the regions of the commercial realms.

Comments

Choose the log category for the type of information that you want to log. For example, if you enable a write log, the requestAction property would contain values of PUT, POST, or DELETE. If you enable a read log, requestAction would contain values of GET, LIST, or HEAD.

Note

Service logs for Object Storage are delivered on a best effort basis. In limited situations, a small number of log entries may not be delivered successfully.

Contents of an Object Storage Log

Property Description
additionalDetails

Includes the following fields when applicable to the particular log:

  • versionId: From PutObject and DeleteObject responses
  • isDeleteMarker: From the DeleteObjectVersion response
  • retentionRuleName
apiType Originating Object Storage API:
  • native
  • s3-compatible
  • swift
authenticationType Request authentication type:
  • user
  • service
  • resource
  • instance
bucketCreator OCID of the bucket creator
bucketId OCID of the bucket
bucketName Name of the bucket
clientIpAddress IP address of the requesting client
compartmentId OCID of the compartment
compartmentName Name of the compartment
credentials Request security credentials
endTime Request end timestamp
errorCode If present, a short error code meant for programmatic parsing that defines the error
eTag Entity tag (ETag) for the resource
isPar Boolean describing whether this is a pre-authenticated request:
  • true
  • false
message Human-readable string describing the request
namespace Object Storage namespace used for the request
objectName Name of the object
opcRequestId Client request ID for tracing
principalId OCID of the requestor
principalName Name of the requestor
region Region identifier
requestAction HTTP method of the request (DELETE/GET/HEAD/POST/PUT)
requestResourcePath Resource path of the request
startTime Request start timestamp
statusCode Response status code
tenantId OCID of the tenant
tenantName OCID of the tenant
userAgent User Agent that sent the request to Object Storage

An Example Object Storage Log

{
   "time": "2020-09-10T19:04:11.324Z",
   "specversion": "1.0",
   "id": "2901893c-2140-491e-b23d-9cc6649fce67",
   "source": "MyBucket",
   "subject": "MyObject",
   "type": "com.oraclecloud.objectstorage.putobject",
    "data": {
      "additionalDetails": {
        "versionId": "7dec129d-ec60-470f-a153-f44af0ac15a6"
      },
      "apiType": "native",
      "authenticationType": "user",
      "bucketCreator": "ocid1.user.oc1..<unique_ID>",
      "bucketId": "ocid1.bucket.oc1.phx.<unique_ID>",
      "bucketName": "MyBucket",
      "clientIpAddress": "203.0.113.4",
      "compartmentId": "ocid1.compartment.oc1..<unique_ID>",
      "compartmentName": "MyObjectStore",
      "credentials": "<credentials>",
      "endTime": "2020-09-10T19:04:11.324Z",
      "isPar": false,
      "message": "Object uploaded.",
      "namespaceName": "MyNamespace",
      "objectName": "MyObject",
      "opcRequestId": "phx-1:7Tx5sjOAXOlcWKX5F-1Wjz_W2zF8aIeqW8PepNgsKHRlqKm3Mrot9IJAuZbQxBEI",
      "principalId": "ocid1.user.oc1..<unique_ID>",
      "principalName": "jane.smith@example.com",
      "region": "us-phoenix-1",
      "requestAction": "PUT",
      "requestResourcePath": "/n/MyNamespace/b/MyBucket/o/MyObject",
      "startTime": "2020-09-10T19:04:10.679Z",
      "statusCode": 200,
      "tenantId": "ocid1.tenancy.oc1..<unique_ID>",
      "tenantName": "MyTenancy",
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36"
    },
    "oracle": {
      "logid": "ocid1.log.oc1.phx.<unique_ID>",
    }
}

Object Storage Log Object Name

Objects that store Object Storage data use the following naming format:

public_log/<bucket_name>/<YYYY-MM-DDTHH_MMZ>[_<seqNum>].log.gz

For example:

public_log/example_bucket/2019-03-21T00_00Z.log.gz
public_log/example_bucket/2019-03-21T00_00Z_2.log.gz

Using the Command Line Interface (CLI)

See Object Storage Example for example commands.