Enable the log collection feature

更新时间:
复制 MD 格式

CloudLens for OSS enables log collection for Object Storage Service (OSS) buckets with a few clicks and provides a global view for managing detailed access logs.

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 a bucket to go to the OSS console and 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 to view 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.