Merge pull request 'docs(gateway): fix the rotation filename in the access-log doc' (#78) from wt/t_e662b03a into master
This commit is contained in:
commit
65b16a82ab
1 changed files with 6 additions and 4 deletions
|
|
@ -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 `<n>.log.<YYYYMMDD-HHMMSS>` (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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue