Skip to content

Instantly share code, notes, and snippets.

@broxio
Created April 12, 2017 10:30
Show Gist options
  • Save broxio/4048d72519deed1902070ca36a3bf5a2 to your computer and use it in GitHub Desktop.
Save broxio/4048d72519deed1902070ca36a3bf5a2 to your computer and use it in GitHub Desktop.
<source>
type tail
path /var/log/foo/bar.log
pos_file /var/log/td-agent/foo-bar.log.pos
tag foo.bar
format /^(?<host>[^ ]*) (?<remote>[^ ]*) - (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<code>[^ ]*) (?<body_bytes_sent>[^ ]*) "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" "(?<http_x_forwarded_for>[^\"]*)" (?<request_time>[^ ]*) (?<request_length>[^ ]*):(?<bytes_sent>[^ ]*)/
time_format %d/%b/%Y:%H:%M:%S %z
</source>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment