Skip to content
New issue

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

Log file is parsed but no response time data is displayed #2783

Open
chad187 opened this issue Jan 7, 2025 · 2 comments
Open

Log file is parsed but no response time data is displayed #2783

chad187 opened this issue Jan 7, 2025 · 2 comments

Comments

@chad187
Copy link

chad187 commented Jan 7, 2025

Version 1.9.3
Example log line:
2024/11/25 19:43:58 127.0.0.1 GET /api/users/auth 174
The number on the end is microseconds
Command to run it:
goaccess filtered.log --log-format='%d %t %h %m %U %D' --date-format='%Y/%m/%d' --time-format='%H:%M:%S' --debug-file=debug.log -a > report.html
Debug.log: nothing

I am guessing that the command and the log line don't match but if that is it I can't figure out how.

@heyainsleymae
Copy link
Contributor

Your date and time formats are correct, but rather than redirecting the goaccess command to a file, you can use the -o/--output option to generate CSV, HTML, and JSON files from your logs.

The updated command would then be:

goaccess filtered.log --log-format='%d %t %h %m %U %D' --date-format='%Y/%m/%d' --time-format='%H:%M:%S' --output=report.html

@allinurl
Copy link
Owner

allinurl commented Jan 8, 2025

@chad187 In order to get the average, cumulative and maximum time served in GoAccess, you will need to start logging response times in your web server. In Nginx you can add $request_time to your log format, or %D in Apache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants