Skip to content

Instantly share code, notes, and snippets.

@titanjer
Last active December 16, 2015 07:06
Show Gist options
  • Save titanjer/211eb001e9a3cf6c0063 to your computer and use it in GitHub Desktop.
Save titanjer/211eb001e9a3cf6c0063 to your computer and use it in GitHub Desktop.
fluentd s3 log
<source>
type tail
path /var/log/cflogs/s3/access.log
pos_file /var/log/cflogs/s3/access.log.pos
format /^(?<owner>[^ ]*) (?<bucket>[^ ]*) \[(?<time>.*)\] (?<remote_ip>[^ ]*) (?<requester>[^ ]*) (?<request_id>[^ ]*) (?<operation>[^ ]*) (?<key>[^ ]*) \"(?<request_uri>.*)\" (?<http_status>[^ ]*) (?<error_code>[^ ]*) (?<bytes_sent>[^ ]*) (?<object_size>[^ ]*) (?<time_total>[^ ]*) (?<turn_around_time>[^ ]*) \"(?<referrer>.*)\" \"(?<user_agent>.*)\" (?<version_id>[^ ]*)/
time_format %d/%b/%Y:%H:%M:%S %z
tag s3.es.uri_escape
</source>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment