This topic describes how to enable the access log management feature in the SLB console. After you enable the feature, you can use Log Service to collect SLB access logs.

Prerequisites

Procedure

  1. Log on to the SLB consoleSLB console.
  2. In the upper-left corner of the page, select the region where the SLB instance resides.
  3. In the left-side navigation pane, choose Logs > Access Logs.
  4. Authorize SLB to assume the AliyunLogArchiveRole role to access Log Service.
    Note
    • If you have authorized SLB to assume the AliyunActionTrailDefaultRole role, skip this step.
    • You must not delete the RAM role or revoke the permissions from the RAM role. Otherwise, logs cannot be shipped to Log Service.
    • If you use a RAM user to log on to SLB, you must authorize the RAM user by using an Alibaba Cloud account. For more information, see Authorize a RAM user to use access logs.
  5. On the Access Logs (Layer-7) page, click Configure in the Actions column of the instance.
  6. In the Configure Logging dialog box, select an available project and a Logstore. , and then click OK.
    After you complete the configuration, indexes are automatically created for the data in the selected Logstore. If indexes were created in the Logstore, the indexes are overwritten.

What to do next

After SLB access logs are collected by Log Service, you can query, download, ship, and transform the logs. You can also create alerts for the logs. For more information, see Common operations on logs of Alibaba Cloud services.