Configuring an ASM gateway's access logs is a two-step process: generation and collection. Generation is when the gateway prints logs to standard output, and you can customize the fields included in these logs. Collection sends the logs to Simple Log Service (SLS) for storage, analysis, and visualization. You can configure and enable generation and collection independently. This document describes how to generate, collect, and view ASM gateway access logs.
Prerequisites
-
You have activated Simple Log Service (SLS) for your Alibaba Cloud account. For more information, see Activate Log Service.
ImportantASM does not charge additional fees for sending logs to Log Service. However, SLS charges based on the volume of ingested data or based on feature usage. For more information about SLS billing, see Billing overview.
-
You have installed the logtail-ds component in the data plane cluster. For more information, see Enable Logtail.
Step 1: Generate access logs
For more information, see Customize data plane access logs.
Step 2: Collect and view access logs
-
Collect access logs. For more information, see Use Log Service to collect access logs of data plane clusters.
-
View the access logs.
-
Log on to the ASM console. In the left-side navigation pane, choose .
-
On the Mesh Management page, click the name of the target ASM instance. In the left-side navigation pane, choose or .
-
In the Observability section to the right of the target gateway, click Log Center or Log Dashboard.
-
Gateway Logs: Displays only logs from the current gateway.
On the Gateway Logs page in SLS, the project name is
mesh-ingress-log. In the search box, enter a query, for example,_pod_name_=istio-ingressgateway2-*, and click Query/Analyze to view the log records and detailed field information for the gateway, such as_container_ip_,_container_name_, and__tag__:_node_ip_. -
Log Dashboard: Displays only the log analysis results for the current gateway. On the Log Dashboard page, select the Gateway Global Overview tab to go to the Mesh Ingress Overview dashboard. The top of the page has filters such as deployment_regex, Host, Service, URL, and Status. The left side of the page shows metric cards, including PV/UV, request success rate, 5XX error rate, average latency, and P9999/P99/P95 latency. The right side shows operational insights, such as user request PV/UV, request distribution by region, ingress and egress traffic and average latency, number of microservices and backend response latency, top provinces by requests, mobile traffic percentage, and 404 and 5XX error rates.
-
ASM instances earlier than v1.17.2.35
For more information, see Use Log Service to collect access logs of data plane clusters.