fluentd
Fluentdインストール(1台のみでApacheのログでテスト) [#d26a1ed6] # yum install sudo -y # curl -L
https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh
| sh →公式インストール手順。リポジトリを引っ張ってインストール。 # cd /etc/td-agent # cp -p td-agent.conf td-agent.conf.org # vim td-agent.conf Apacheの場合ここから [#z06851ed] <source> type tail path /var/log/httpd/
access_log pos_file /tmp/access_log.pos format apache2 tag apache2.access_log </source> <match apache2.access_log> type file path /var/log/td-agent/copy-access_log </match> nginxの場合ここから [#qdcca822] <source> type tail path /var/log/nginx/access.log pos_file /var/lib/fluent/access.pos tag nginx.access format /^(?<remote>[^ ]) (?<host>[^ ]
) (?<user>[^ ]) [(?<time>[^]]
)] "(?<method>\S+)(?: +(?<path>[^"]) +\S*)?" (?<code>[^ ]*) (?