Contenu connexe
Similaire à FluentdとAWSを使ったログの運用
Similaire à FluentdとAWSを使ったログの運用 (20)
Plus de Keisuke Izumiya (10)
FluentdとAWSを使ったログの運用
- 2. 自己紹介
• 名前 泉谷圭祐
• 所属
• TIS株式会社 IT基盤サービス企画室
• eXcale(https://www.excale.net/)の中の人
• 好きなAWSのサービス
• Route 53
• SNS
• Twitter @syguer
• Facebook https://www.facebook.com/keisuke.izumiya
- 16. fluentdの設定(1)
# Input
<source>
type tail
path /var/log/messages
format syslog
pos_file /var/log/fluentd/messages.pos
tag messages
</source>
# Output
<match messages>
type forward
send_timeout 60s
recover_wait 10s
heartbeat_interval 1s
phi_threshold 8
hard_timeout 60s
<server># <= 送信先サーバーの指定
name log_proxy
host 192.168.1.1
port 24224
</server>
</match>
- 18. fluentdの設定(2)
# Input
<source>
type forward
port 24224
bind 0.0.0.0
</source>
# Output
<match messages>
type s3
aws_key_id ACCESS_KEY
aws_sec_key SECRET_KEY
path /
!
s3_bucket BUCKET_NAME
s3_endpoint END_POINT
s3_object_key_format %{time_slice}%{path}_%{index}.%{file_extension}
!
time_slice_format %Y/%m/%d/
time_slice_wait 10m
store_as text
</match>