ngxtop icon indicating copy to clipboard operation
ngxtop copied to clipboard

log_format of apache access logs

Open lukashes opened this issue 12 years ago • 1 comments

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.

lukashes avatar Mar 31 '14 08:03 lukashes

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

xRayDev avatar Mar 03 '21 14:03 xRayDev