We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a simple log but I cannot figure out how to parse the datetime component
sample line
{"time":1673085237.244,"client":"10.10.10.10","method":"GET","request":"GET /search/? HTTP/1.1","request_length":390,"status":"307","bytes_sent":238,"gzip_ratio":"","body_bytes_sent":0,"referer":"","user_agent":"python-requests/2.28.1","accept_encoding":"gzip","accept":"*/*","request_time":0.002} goaccess sample_access_logs.txt -o report.html --date-format %* --time-format %* --log-format '{"time":%T,"client":"%h","method":"%m","request":"%r","request_length":%^,"status":"%s","bytes_sent":"%b","gzip_ratio":"%^","body_bytes_sent":%^,"referer":"%R","user_agent":"%u","accept_encoding":"%^","accept":"%^","request_time":%L}'
This produces the output
A valid date is required Format Errors - Verify your log/date/time format
If I change it to
goaccess sample_access_logs.txt -o report.html --date-format %* --time-format %* --log-format '{"time":%d,"client":"%h","method":"%m","request":"%r","request_length":%^,"status":"%s","bytes_sent":"%b","gzip_ratio":"%^","body_bytes_sent":%^,"referer":"%R","user_agent":"%u","accept_encoding":"%^","accept":"%^","request_time":%L}' Token '1673085237.244' doesn't match specifier '%d'
The text was updated successfully, but these errors were encountered:
This should do it:
goaccess access.log --log-format='{ "time": "%x.%^", "client": "%h", "method": "%m", "request": "%U", "status": "%s", "bytes_sent": "%b", "referer": "%R", "user_agent": "%u", "request_time": "%T" }' --datetime-format='%s'
Sorry, something went wrong.
Closing this. Feel free to reopen it if needed.
No branches or pull requests
I have a simple log but I cannot figure out how to parse the datetime component
sample line
This produces the output
If I change it to
The text was updated successfully, but these errors were encountered: