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

parsing other log-files #81

Closed
belaoulidris opened this issue Oct 31, 2017 · 5 comments
Closed

parsing other log-files #81

belaoulidris opened this issue Oct 31, 2017 · 5 comments

Comments

@belaoulidris
Copy link

Hi

is there a way to parse other log files other then access.log, for example app.access.log ?

@vbh689
Copy link

vbh689 commented Nov 11, 2017

ngxtop -l /path/to/app.access.log ?

@belaoulidris
Copy link
Author

I have tried that @dfmcvn . it didn't work.
no-logs

@vbh689
Copy link

vbh689 commented Nov 17, 2017

https://imgur.com/oPtwmaL
Tried that, work well. Maybe the problem is in your log file?

@joshnabbott
Copy link

@belaoulidris This was happening to me too and my nginx config is using a custom log format, which turned out to be the issue. Check your nginx.conf file to see if you're doing the same (grep for log_format in the config directory) and if so, just pass ngxtop the config format and it works:

ngxtop -f '$remote_addr - $remote_user [$time_iso8601] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$host"' -l /path/to/access.log

@joshnabbott joshnabbott mentioned this issue Nov 5, 2018
@belaoulidris
Copy link
Author

@belaoulidris This was happening to me too and my nginx config is using a custom log format, which turned out to be the issue. Check your nginx.conf file to see if you're doing the same (grep for log_format in the config directory) and if so, just pass ngxtop the config format and it works:

ngxtop -f '$remote_addr - $remote_user [$time_iso8601] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$host"' -l /path/to/access.log

Thanks, @joshnabbott that works now, indeed it was a custom log file and I had to pass the log format to get it to work.

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

No branches or pull requests

3 participants