CloudLens for CLB enables one-click collection of CLB access logs, Cloud Config logs, and CloudMonitor events.
Prerequisites
-
A CLB instance is created. Create an instance.
-
A Layer 7 listener (HTTP or HTTPS) is configured for the CLB instance. Add an HTTP listener or Add an HTTPS listener.
-
A Simple Log Service project and Logstore are created. Manage a project. Create a basic Logstore.
-
To collect Cloud Config logs, activate Cloud Config. Quick start for Cloud Config.
-
To collect CloudMonitor events, activate EventBridge. Step 1: Activate EventBridge.
Grant permissions
This is a one-time authorization. Skip this section if already completed.
Log on to the Simple Log Service console.
-
In the Log Application section, on the Cloud Service Lens tab, click CloudLens for CLB.
-
Follow the on-screen instructions to enable CloudLens for CLB.
Enabling this feature automatically authorizes CloudLens for CLB to use the
AliyunServiceRoleForSLSAuditservice-linked role for log collection. Manage the AliyunServiceRoleForSLSAudit service-linked role.
Enable data collection
CloudLens for CLB collects access logs, Cloud Config logs, and CloudMonitor events. The procedure is similar for all data types. The following steps use access log collection as an example.
Log on to the Simple Log Service console.
-
In the Log Application section, on the Cloud Service Lens tab, click CloudLens for CLB.
-
On the CLB Instance Access tab of the Data Import Management page, find the target CLB instance and click Enable.
-
In the Enable Access Log Collection dialog box, select the destination project and Logstore, and then click Confirm.
Important-
Using the suggested project and Logstore simplifies asset management.
-
When enabling Cloud Config log collection for the first time, click Authorize Now in the Cloud Config Logs dialog box to grant Simple Log Service access to Cloud Config logs.
-
Related operations
After enabling CloudLens for CLB, you can perform the following operations on the Data Import Management page.
|
Actions |
Description |
|
Manage CLB instances |
After you enable CloudLens for CLB, CloudLens for CLB displays all CLB instances in your Alibaba Cloud account. Click a CLB instance to open the CLB console, where you can view details and manage listeners. CLB instances. |
|
Disable data collection |
|
|
Query and analyze logs |
Click Access Logs for a CLB instance to open its Logstore, where you can query and analyze logs. Quick guide to query and analysis. |
|
Modify the retention period |
On the Destination Logstores tab, find the target Logstore and click the |
|
Upgrade legacy access logs |
If log shipping is already enabled for a CLB instance on the CLB console, access logs are collected by default when you enable data collection in CloudLens for CLB. However, this basic collection does not include anomaly detection or metric extraction. Click Upgrade to enable these features. CloudLens for CLB then automatically performs anomaly detection, extracts metrics, and generates assets such as inspection results, a Metricstore, and inspection jobs. |
icon to change its data retention period.