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
The following procedure describes how to enable collection for access logs. The collection of Metering Logs and metrics starts automatically.
Log on to the Simple Log Service console.
-
In the Log Application section, on the Cloud Service Lens tab, click CloudLens for OSS.
-
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.
-
On the Data Import Management page, on the Buckets tab, click Enable for the target bucket.
-
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.
-
Change the data retention period of a Logstore. For more information about retention periods and billing, see Usage notes of CloudLens for OSS.
-
Reset indexes. For more information, see Real-time log query.
-
View the bucket associated with a Logstore.
-