chassis-agent/fluentd/conf/fluent.conf

32 lines
991 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# fluentd/conf/fluent.conf
<source>
@type forward # source表示日志源来自转发forward与http是默认安装的组件不需要额外的插件支持。
port 24224 # 在24224端口启动forward接收转发
bind 0.0.0.0 # 允许接收任意IP的转发
</source>
<match *.**>
@type copy
<store>
@type elasticsearch # 转发日志到es这需要安装es的插件
host elasticsearch # es的配置信息
port 9200
index_name fluentd
logstash_format true # 启动转发
logstash_prefix fluentd-${tag} # 转发到es的索引名称
logstash_dateformat %Y.%m # 按月来划分索引,可以删除无用数据
include_tag_key true
type_name application_log
tag_key @log_name
reconnect_on_error true
reload_on_failure true
reload_connections false
<buffer>
flush_interval 2s # 每2s刷新一次
</buffer>
</store>
<store>
@type stdout # 搜索到数据后立即转发到es
</store>
</match>