Log Service can collect Object Storage Service (OSS) access logs, query and analyze the collected OSS access logs in real time, and clearly display analysis results by using multiple visual charts. These professional collection and analysis features for OSS access logs simplify your operation log auditing and event tracing, and allow you to work more efficiently.

Prerequisites

  1. You have activated Log Service.
  2. You have activated OSS, and created one or more buckets.
  3. The project in Log Service and the bucket in OSS belong to the same Alibaba Cloud account and remain in the same region.

Procedure

  1. Authorize log collection.
    Click here to authorize Log Service to store OSS access logs to your Logstore.

    You can also choose Log Service > Authorize Log Service in the OSS console to complete authorization.

  2. Associate one or more buckets with you Logstore.
    1. In the OSS console, choose Log Service > Configure to go to the Log Service page.
    2. Click Associate to continue with the next step.
      Figure 1. Associate one or more buckets with your Logstore


      1. Select or create a project.

        Select the region where the Log Service project is located and the Log Service project name, and click Next.

        Note
        • Your project in Log Service and the bucket in OSS must remain in the same region. Log Service can collect and store logs from multiple buckets to the same Logstore for real-time queries and analysis.
        • If you have not created any Log Service project in the current region, you can click Create Project to create a project.
      2. Select or create a Logstore.

        Select a Logstore name and click Next.

        Note If you have not created any Logstore of Log Service in the current region, you can click Create Logstore to create a Logstore.
      3. Associate one or more buckets with your Logstore.

        Select a bucket name and click Submit. You can also select multiple bucket names to associate these buckets with the Logstore in the current region.

        Figure 2. Associate one or more buckets with your Logstore


      You have created association rules. Click Configure Index in the dialog box that appears to go to the Log Service console and configure indexes.