Basti's Scratchpad on the Internet

Parse S3 Logs with Goaccess

Note to self, create ~/.goaccessrc add S3 log format,

date_format %d/%b/%Y
log_format %^ %^ [%d:%^] %h %^ %^ %^ %^ "%^ %r %^" %s %^ %b %^ %^ %^ "%^" "%u" %^

Sync log bucket to local folder,

s3cmd sync  s3://logs.nakkaya.com/ ./

Parse yesterdays logs,

find . -name "`date +%Y-%m-%d -d "yesterday"`*" -exec cat {} \; | goaccess -a

Parse all logs,

find . -exec cat {} \; | goaccess -a
Other posts
comments powered by Disqus