Skip to content

Instantly share code, notes, and snippets.

@ming-cho
Forked from sonots/out_forward.conf
Created June 29, 2016 05:32
Show Gist options
  • Save ming-cho/df34f2b0633ba9fd8c2f3ed58b6684a5 to your computer and use it in GitHub Desktop.
Save ming-cho/df34f2b0633ba9fd8c2f3ed58b6684a5 to your computer and use it in GitHub Desktop.
ログの欠損をできるだけ避ける Fluentd の out_forward 設定サンプル cf. http://blog.livedoor.jp/sonots/archives/44690980.html
<source>
type in_tail
# ...
tag raw.eventlog
</source>
<match raw.**>
type forward
log_level "#{ENV['DEBUG'] ? 'debug' : 'info'}"
buffer_type file
buffer_path /var/log/fluentd-sender/buffer/buffer
buffer_queue_limit 9999999999999 # DO NOT discard new incoming data anyway
buffer_chunk_limit 4m
flush_interval 30s # default: 60
try_flush_interval 1 # default: 1
queued_chunk_flush_interval 1 # default: 1
num_threads 2 # 64Mbps (2 * 4m / 1 sec) at maximum
retry_wait 30s # default: 1.0
max_retry_wait 1h # default: inifinity
disable_retry_limit true # DO NOT discard buffer anyway
require_ack_response true
send_timeout 60s # default: 60s
ack_response_timeout 61s # default: 190s
heartbeat_type tcp
recover_wait 10s # default: 10s
phi_threshold 16 # default: 16
hard_timeout 60s # default: equals to send_timeout
<server>
host foobar
port 24224
</server>
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment