CloudLens for ALB lets you enable one-click data collection for Application Load Balancer (ALB) access logs.
Prerequisites
You have an Application Load Balancer (ALB) instance. For more information, see Create and manage an ALB instance.
You have a Project and a Logstore in Simple Log Service. For more information, see Manage a Project and Create a Logstore.
Configure permissions
This is a one-time operation.
Log in to the Simple Log Service console.
In the Log Application section, on the Cloud Service Lens tab, click CloudLens for ALB.
Follow the on-screen instructions to enable CloudLens for ALB.
When you enable CloudLens for ALB, Simple Log Service automatically assumes the AliyunServiceRoleForSLSAudit service-linked role to collect ALB access logs. For more information, see Manage the AliyunServiceRoleForSLSAudit service-linked role.
Enable data collection
Log in to the Simple Log Service console.
In the Log Application section, on the Cloud Service Lens tab, click CloudLens for ALB.
On the Data Import Management page, on the ALB Instance Access tab, find the target ALB instance and click Enable.
In the Enable Access Logs Collect dialog box, select the destination Project and Logstore, and click Confirm.
Related operations
After you enable CloudLens for ALB, you can perform the following operations on the Data Import Management tab.
Actions | Description |
Manage ALB instances | After you enable CloudLens for ALB, all ALB instances in your Alibaba Cloud account are displayed. Click an ALB instance to go to the Server Load Balancer (SLB) console, where you can view instance details and perform operations such as creating a listener. For more information, see View instance details. |
Disable data collection | To disable data collection for an ALB instance, click Disable. |
Query and analyze logs | Click Access Logs for an ALB instance to go to its Logstore, where you can view raw logs and run queries. For more information, see Quick start for log query and analysis. |
Modify the data retention period | On the Destination Logstores tab, find the target Logstore and click the |
Upgrade legacy access logs | If you have already enabled log shipping for your ALB instance on the SLB console, CloudLens for ALB only collects access logs by default without performing anomaly detection or metric extraction. Click Upgrade to let CloudLens for ALB automatically perform anomaly detection, extract metrics, and generate assets such as inspection results, a MetricStore, and inspection jobs. |
icon to modify its data retention period.