Service Mesh (ASM) provides Log Center that allows you to view control-plane logs and data-plane logs in the ASM console. After you enable log collection, you can use Log Center to view control-plane logs, configure log-based alerting rules, and view data-plane logs and related dashboards. This topic describes how to enable data-plane log collection.
Prerequisites
Simple Log Service is activated for your Alibaba Cloud account. For more information, see "Step 1: Activate Simple Log Service" in the Getting Started topic.
ImportantYou are not charged for collecting logs to Simple Log Service in ASM. However, Simple Log Service charges you in the pay-by-feature or pay-by-ingested-data billing mode. For more information about the billing of Simple Log Service, see Billing overview.
The logtail-ds component is installed in the data-plane cluster. For more information, see Step 1: Install Logtail.
A cluster is added to an ASM instance of version 1.17.2.35 or later. For more information, see Add a cluster to an ASM instance and Update an ASM instance.
Enable data-plane log collection
Log on to the ASM console. In the left-side navigation pane, choose .
On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose .
On the Log Center page, collect ASM gateway logs and sidecar proxy logs to Simple Log Service based on your business requirements.
To collect ASM gateway logs, perform the following operations: Click or , specify AccessLogGatewayLifecycle, and then click Enable Gateway Log Collection. In the Submit message, click OK.
To collect sidecar proxy logs, perform the following operations: Click or , specify AccessLogSidecarLifecycle, and then click Enable Sidecar Log Collection. In the Submit message, click OK.
If you no longer need to use this feature, you can disable it in the upper right corner of the corresponding tab.
View data-plane logs
After access logs are collected to Simple Log Service, you can view and retrieve the access logs of a gateway or sidecar proxy on the Data-Plane Logs tab of the Log Center page.
View data-plane log dashboards
After the access logs are collected to Simple Log Service, you can view the visualized reports that are generated based on the access logs of the ASM gateway or sidecar proxy on the Data-Plane Log Dashboard tab of the Log Center page.
Related operations
Modify a data-plane log project
Log on to the ASM console. In the left-side navigation pane, choose .
On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose .
On the Data-Plane Logs or Data-Plane Log Dashboard tab of the Log Center page, click Modify next to Data Plane Log Project. In the Modify Data Plane Log Project dialog box, modify the project based on your business requirements and click Save Settings.