-
Notifications
You must be signed in to change notification settings - Fork 1
goaccess
Émilien Devos (perso) edited this page Feb 13, 2023
·
1 revision
For ingress nginx:
log-format-upstream: '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" - $request_headers'
server-snippet: |
set_by_lua_block $request_headers{
local h = ngx.req.get_headers()
local request_headers_all = ""
for k, v in pairs(h) do
local rowtext = ""
rowtext = string.format("[%s %s]\n", k, v)
request_headers_all = request_headers_all .. rowtext
end
return request_headers_all
}
Goaccess:
goaccess --log-format='%h %^[%d:%t %^] "%r" %s %b "%R" "%u" %T %^' --date-format=%d/%b/%Y --time-format=%T -o report.html --real-time-html