amazon web services - Extract date time from Apache Combined log format using AWS Logs and Cloudwatch -


we're using awslogs collect apache combined formatted logs cloudwatch. it's capturing fine, we're getting timestamp not parsed message error.

an example log entry:

::ffff:10.0.0.1 - blahblah [17/aug/2017:20:31:07 +0000] "get /favicon-16x16.png http/1.1" 304 - "http://blahblah:3000/" "mozilla/5.0 (macintosh; intel mac os x 10_12_6) applewebkit/537.36 (khtml, gecko) chrome/60.0.3112.90 safari/537.36"

our config set of log files looks this, including our datetime_format entry:

[access_logs] log_group_name = cromwell log_stream_name = react-172.31.43.245-access file = /home/admin/aperian-react/log/*access.log datetime_format = "%d/%b/%y:%h%m:%s %z" multi_line_start_pattern = ::ffff: time_zone = utc encoding = ascii

as can see, datetime mid-line. different examples syslogs, etc. change our log format, we'd prefer not since flow other systems well.

our dateformat_string missing colon.😒 😢

datetime_format = "%d/%b/%y:%h%m:%s %z"  # wrong datetime_format = "%d/%b/%y:%h:%m:%s %z" # correct 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -