Skip to content

Instantly share code, notes, and snippets.

@athurg
Created March 8, 2018 05:59
Show Gist options
  • Save athurg/d7b0ac58431e9c60947791756338d2d5 to your computer and use it in GitHub Desktop.
Save athurg/d7b0ac58431e9c60947791756338d2d5 to your computer and use it in GitHub Desktop.
Fluentd采集Docker日志配置范例
<source>
@type forward
port 24224
</source>
<filter docker.**>
@type record_transformer
<record>
log ${time} ${record["container_name"]} ${record["log"]}
</record>
remove_keys container_id,source
</filter>
<match docker.**>
@type file
format single_value
message_key log
buffer_queue_limit 10
buffer_chunk_limit 10m
symlink_path
flush_at_shutdown true
path /var/docker/fluentd/log/docker
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment