Skip to main content

Access Logs

Enable Kmesh access logging

Kmesh accesslog can be enabled and disabled using kmeshctl.

Please refer to the Kmeshctl Monitoring Guide

Detailed TCP Access Logs Generated by Kmesh

Logs are generated by the Kmesh daemon during key stages of a TCP connection's lifecycle:

  • If the connectionMetrics is enabled, at regular 5-second intervals while the connection is active.

  • Upon connection closure

Access Log Field Descriptions :

NameDescribe
src.addrSource address and port, source workload of the request
src.workloadName of the Pod that initiated the request
src.namespaceNamespace of source worklaod
dst.addrDestination address and port, destination workload of the request
dst.serviceHostname of deatination service
dst.workloadName of the Pod receiving the request
dst.namespaceNamespace of destination workload
directionThe direction of the traffic. INBOUND means into the destination service, OUTBOUND means out of the source service
sent_bytesNumber of bytes sent for this connection
received_bytesNumber of bytes received for this connection
durationDuration of this

An example log entry is shown below:

accesslog: 2025-04-24 08:54:40.971980208 +0000 UTC src.addr=10.244.2.79:41978, src.workload=ws-client, src.namespace=default, dst.addr=10.244.2.78:8080, dst.service=ws-server-service.default.svc.cluster.local, dst.workload=ws-server, dst.namespace=default, start_time=2025-04-24 08:53:50.919245381 +0000 UTC, direction=OUTBOUND, state=BPF_TCP_ESTABLISHED, sent_bytes=3, received_bytes=227, packet_loss=0, retransmissions=0, srtt=40515us, min_rtt=34us, duration=50052.734827ms