Skip to content

Instantly share code, notes, and snippets.

@oranie
Created February 23, 2012 05:56
Show Gist options
  • Save oranie/1890801 to your computer and use it in GitHub Desktop.
Save oranie/1890801 to your computer and use it in GitHub Desktop.
apache_fluent.conf
<source>
type tail
format /^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
time_format %d/%b/%Y:%H:%M:%S %z
path /var/log/httpd/access_log_sym
tag apache.access
pos_file /var/tmp/access.log.pos
</source>
<source>
type tail
format /^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^1-3][0-9]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response_time>[^ ]*))?$/
time_format %d/%b/%Y:%H:%M:%S %z
path /var/log/httpd/access_log_sym
tag apache.error
pos_file /var/tmp/error.log.pos
</source>
<match apache.access>
flush_interval 1
type tcp
host localhost
</match>
<match apache.error>
flush_interval 1
type tcp
host localhost
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment