Enable data-plane log collection

更新时间:
复制 MD 格式

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

Enable data-plane log collection

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the target instance. In the left-side navigation pane, choose Observability Management Center > Log Center.

  3. On the Log Center page, collect gateway logs and sidecar proxy logs to SLS as needed.

    • Collect gateway logs: Click the Data-Plane Logs > ASM Gateway Logs tab or the Data-Plane Log Dashboard > Gateway Dashboards tab. Enter the AccessLogGatewayLifecycle, click Enable Gateway Log Collection, and in the Confirm dialog box, click OK.

    • Collect sidecar proxy logs: Click the Data-Plane Logs > Sidecar Proxy Logs tab or the Data-Plane Log Dashboard > Sidecar Proxy Dashboards tab. Enter the AccessLogSidecarLifecycle, click Enable Sidecar Log Collection, and in the Confirm dialog box, click OK.

Note

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

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the target instance. In the left-side navigation pane, choose Observability Management Center > Log Center.

  3. 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.