All Products
Search
Document Center

Simple Log Service:Enable the log collection feature

Last Updated:Jun 22, 2026

CloudLens for OSS lets you enable log collection for Object Storage Service (OSS) buckets with a few clicks and manage detailed access logs in a global view.

Procedure

Important

The following procedure describes how to enable collection for access logs. The collection of Metering Logs and metrics starts automatically.

  1. Log on to the Simple Log Service console.

  2. In the Log Application section, on the Cloud Service Lens tab, click CloudLens for OSS.

  3. Complete authorization as prompted. This step is required only the first time you enable CloudLens for OSS. Alibaba Cloud automatically creates a service-linked role named AliyunServiceRoleForSLSAudit and assigns it to CloudLens for OSS to collect logs from OSS buckets. For more information, see Manage the AliyunServiceRoleForSLSAudit service-linked role.

  4. On the Data Import Management page, on the Buckets tab, click Enable for the target bucket.

  5. In the Confirm to enable access log collection dialog box, click OK. Once enabled, CloudLens for OSS displays all eligible buckets in your Alibaba Cloud account.

What to do next

On the Data Import Management page:

  • Click the Buckets tab.

    • Click the bucket that you want to manage to go to the OSS console, where you can view bucket details. For more information, see Overview of buckets.

    • To disable the collection of access logs, find the target bucket and click Disable in the Access Logs column.

    • Find the target bucket, click Log Search, and then select a log type to open the Query and Analysis page, where you can view the specific logs.

    • Find the target bucket, click Report Center, and then select a report to open the Report Center page. For more information, see View data reports.

  • Click the Destination Logstore tab.

    • Change the data retention period of the Logstore that you want to manage. For more information about data retention periods and billing, see Usage notes of CloudLens for OSS.

    • Reset indexes. For more information about how to reset indexes, see Real-time log query.

    • View the bucket associated with a Logstore.