docs(gateway): fix the rotation filename in the access-log doc #78
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
|
# drive one request through the tunnel and read the line
|
||||||
curl -s -o /dev/null "https://siriusdevops.com/?probe=$(date +%s)"
|
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 —
|
A request that matches a Cloudflare cache HIT never reaches the origin and therefore produces no line —
|
||||||
add a query string when proving logging.
|
add a query string when proving logging.
|
||||||
|
|
||||||
Rotation happens at 10 MiB; when the container log rotates, `kubectl logs` and the glob above still
|
Rotation happens at 10 MiB. kubelet renames the full file to `<n>.log.<YYYYMMDD-HHMMSS>` (observed
|
||||||
cover the previous files (`*.log.1`, ...).
|
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
|
## Parse
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# one line -> flat record; client_ip is the real client for tunnelled traffic
|
# 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 //' \
|
| sed 's/^.* stdout F //' \
|
||||||
| jq -c 'select(.gateway=="gateway-system/public")
|
| jq -c 'select(.gateway=="gateway-system/public")
|
||||||
| {ts:.start_time, host:.authority, method, path, code:.response_code,
|
| {ts:.start_time, host:.authority, method, path, code:.response_code,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue