Istio access logs
Collect and review access logs to monitor the traffic to your Istio-enabled workloads.
About
Leverage the default Envoy access log collector to record logs for the Istio ingress gateway and Istio-enabled workloads in your service mesh. You can then review these logs to troubleshoot issues as-needed, or scrape these logs to view them in your larger platform logging system. The full record of each request includes source and destination metadata, such as the client ID that initiated the request. Auditors in your organization can use this information to detect malicious activity or unusual amounts of requests to your gateway.
To get started, enable the default Envoy access log collector in your Istio installation.
Enable access logging
Enable the default Envoy access log collector when you install or update Istio.
Allow your Istio-enabled workloads to produce access logs by updating your Istio installation.
Restart the workloads that you want to collect access logs for. For example, to restart the Bookinfo product page app, run the following command.
View access logs
View the Envoy access logs that are recorded by default for workloads in your service mesh.
The following example steps assume that you installed the Bookinfo app in your cluster. You can follow the Get started guide to install Bookinfo. However, you can edit these example steps for your own apps as well.
Create a temporary container with the
curl
utility in the same namespace as theratings
Bookinfo service.From the new terminal, generate access logs by sending requests to
ratings
. Typeexit
when you’re done.View the
ratings
access logs.Check the logs for the
ratings
app. All access logs for the requests that you previously sent are recorded. For example, the logs might look similar to the following: