Menu

#1799 LogFormat Syntax for Web Logs from AWS ELB

open
nobody
None
1
2016-10-11
2016-10-11
bootbeast
No

Greetings,

I'm trying to figure out the correct LogFormat syntax to use for webserver logs from an Amazon elastic load balancer. They have this format.

2016-10-11T00:07:37 Name-of-ELB source-IP:port dest-ip:port 0.000048 0.002299 0.000022 200 200 0 1271 "GET https://www.example.com:443/content HTTP/1.1" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0" iphers TLSv1.2

I am attempting to use:
LogFormat="%time5 %other %host %other %host_r %other %other %other %other %code %other %other %bytesd %methodurl %other %other"
I have also tried removing the "T" in the timestamp and using %time2. When I run:

perl awstats.pl -update -config=mysite

AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /home/opswat/logs/www.opswat.com/access_log must have a bad format or LogFormat parameter setup does not match this format.

If I shorten the log file to just the first 49 lines, I don't get this error, just that 49 corrupted records were found and nothing else.

Thanks in advance for any tips.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB