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 Collect and analyze ECS text logs using LoongCollector 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 Collect container logs from ACK clusters.
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 Upgrade 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 target instance. In the left-side navigation pane, choose .
-
On the Log Center page, collect gateway logs and sidecar proxy logs to SLS as needed.
-
Collect gateway logs: Click the tab or the tab. Enter the AccessLogGatewayLifecycle, click Enable Gateway Log Collection, and in the Confirm dialog box, click OK.
-
Collect sidecar proxy logs: Click the tab or the tab. Enter the AccessLogSidecarLifecycle, click Enable Sidecar Log Collection, and in the Confirm dialog box, 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 in SLS, you can view and query access logs for gateways or sidecars on the Data-Plane Logs tab of the Log Center page.
View data-plane log dashboards
After access logs are collected in SLS, you can view dashboards for gateway and sidecar access logs 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 target instance. In the left-side navigation pane, choose .
-
On the Log Center page, go to the Data-Plane Logs or Data Plane Log Dashboard tab. Click Modify next to Data Plane Log Project:. In the Modify Data Plane Log Project dialog box, change the settings as needed and click Save Settings.