diff --git a/docs/gateway-access-logging.md b/docs/gateway-access-logging.md index 1e2d134..470f3eb 100644 --- a/docs/gateway-access-logging.md +++ b/docs/gateway-access-logging.md @@ -93,20 +93,22 @@ sudo curl -s --unix-socket /var/run/cilium/envoy/sockets/admin.sock \ # drive one request through the tunnel and read the line curl -s -o /dev/null "https://siriusdevops.com/?probe=$(date +%s)" -sudo tail -1 /var/log/pods/kube-system_cilium-envoy-*/cilium-envoy/*.log +sudo tail -1 /var/log/pods/kube-system_cilium-envoy-*/cilium-envoy/*.log* ``` A request that matches a Cloudflare cache HIT never reaches the origin and therefore produces no line — add a query string when proving logging. -Rotation happens at 10 MiB; when the container log rotates, `kubectl logs` and the glob above still -cover the previous files (`*.log.1`, ...). +Rotation happens at 10 MiB. kubelet renames the full file to `.log.` (observed +2026-11-27T07:02:56Z: `3.log` 10,528,075 B -> `3.log.20261127-020256`, new `3.log` started, 29.3 min +after the first access line — the projection was 28.6 min) and starts a new `*.log`. The `*.log*` +glob in the commands above therefore covers rotated files too; a plain `*.log` would miss them. ## Parse ```bash # one line -> flat record; client_ip is the real client for tunnelled traffic -sudo grep -h '"authority"' /var/log/pods/kube-system_cilium-envoy-*/cilium-envoy/*.log \ +sudo grep -h '"authority"' /var/log/pods/kube-system_cilium-envoy-*/cilium-envoy/*.log* \ | sed 's/^.* stdout F //' \ | jq -c 'select(.gateway=="gateway-system/public") | {ts:.start_time, host:.authority, method, path, code:.response_code,