Created
November 15, 2012 11:32
-
-
Save matsumana/4078174 to your computer and use it in GitHub Desktop.
FluentdのWebサーバ用設定ファイル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<source> | |
type tail | |
path /var/log/httpd/access_log | |
pos_file /var/lib/fluent/access_log.pos | |
# apacheのログフォーマットは以下 (デフォルトの末尾に%Dを付けただけ) | |
# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined | |
format /^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)" (?<response>[^ ]*))?$/ | |
time_format %d/%b/%Y:%H:%M:%S %z | |
tag apache.access.host01 | |
</source> | |
<match apache.access.**> | |
type forward | |
<server> | |
host fluent00 | |
</server> | |
buffer_type file | |
buffer_path /var/log/fluent/apache-forward | |
retry_limit 9 | |
flush_interval 1s | |
</match> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment