Last active
December 16, 2015 07:10
-
-
Save masayuki5160/e6a55f81f7cd19168f64 to your computer and use it in GitHub Desktop.
td-agentのs3 Pluginを使っている
This file contains hidden or 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
$curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh | |
$sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-parser | |
$sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-s3 | |
$sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-bigquery | |
$sudo chmod 755 -R /var/log/httpd/ | |
$sudo vi /etc/td-agent/td-agent.conf | |
### | |
## Output descriptions: | |
## | |
<match apache.access> | |
type s3 | |
aws_key_id xxxxxxxxxxxxxxxxxxxx | |
aws_sec_key xxxxxxxxxxxxxxxxxxxxxx | |
s3_bucket bucket-td-access | |
s3_region ap-northeast-1 | |
s3_object_key_format %{path}%{time_slice}_%{index}_%{hostname}.%{file_extension} | |
path access_logs/ | |
buffer_path /var/log/td-agent/buffer | |
flush_interval 60s | |
time_slice_format %Y%m%d/%Y%m%d-%H | |
</match> | |
### | |
## Source descriptions: | |
### | |
<source> | |
type tail | |
format ltsv | |
path /path/ | |
tag apache.access | |
pos_file /tmp/td-agent/apache.pos | |
</source> | |
参考サイト | |
Installing Fluentd Using rpm Package | |
http://docs.fluentd.org/articles/install-by-rpm | |
EC2のログをfluentdを使ってタグ情報を利用したフォルダ構成でS3にアップロードする | |
http://qiita.com/toshihirock/items/3e59dc20998981647d8c | |
Fluentdで、RailsのログをS3に保存する方法 | |
http://qiita.com/jwako/items/22394a9755ed64504161 | |
fluent-plugin-forestが見つからない! | |
http://qiita.com/pman-taichi/items/24d05f40c8d292e6698c | |
fluentdのoutput_s3プラグイン | |
http://qiita.com/munazo/items/d665e2c4e86f42d06cf7 | |
awsのs3を操作する為のaccess keyとsecret keyを取得する(IAM) | |
http://joppot.info/2014/06/14/1621 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ltsvがいいのか。
https://codeiq.jp/magazine/2014/08/12686/