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_format of apache access logs #26

Open
lukashes opened this issue Mar 31, 2014 · 1 comment
Open

log_format of apache access logs #26

lukashes opened this issue Mar 31, 2014 · 1 comment

Comments

@lukashes
Copy link

Hi!

I have log like this:

192.168.7.40 - - [31/Mar/2014:04:02:02 +0400] "POST /my/url HTTP/1.0" 200 16 "-" "Zend_Http_Client"

It successfully parsed by ngxtop, but if I have this format:

192.168.7.40 192.168.7.41 - [31/Mar/2014:04:02:02 +0400] "POST /my/url HTTP/1.0" 200 16 "-" "Zend_Http_Client"

It does not parse.

How can I parsed this log? I tried to use --log-format but it did not help me.

@xRayDev
Copy link

xRayDev commented Mar 3, 2021

For Apache log fromat like:
LogFormat "%a %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined

-f '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'

This work for my

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

2 participants