1. global所有配置项
#========================= Filebeat global options ============================
# Event count spool threshold - forces network flush if exceeded
#filebeat.spool_size: 2048
# Enable async publisher pipeline in filebeat (Experimental!)
#filebeat.publish_async: false
# Defines how often the spooler is flushed. After idle_timeout the spooler is
# Flush even though spool_size is not reached.
#filebeat.idle_timeout: 5s
# Name of the registry file. If a relative path is used, it is considered relative to the
# data path.
#filebeat.registry_file: ${path.data}/registry
#
# These config files must have the full filebeat config part inside, but only
# the prospector part is processed. All global options like spool_size are ignored.
# The config_dir MUST point to a different directory then where the main filebeat config file is in.
#filebeat.config_dir:
# How long filebeat waits on shutdown for the publisher to finish.
# Default is 0, not waiting.
#filebeat.shutdown_timeout: 0
2. 具体配置项解释
2.1 filebeat.spool_size
spooler的大小,当spooler中的事件数量超过这个阈值的时候,会清空发送出去不论是否到达超时时间。
2.2 publish_async
是否采用异步发送模式,属于实验功能,已经在最新版废弃
2.3 idle_timeout
spooler的超时时间如果到了超时时间,spooler也会清空发送出去不论是否到达容量的阈值。
2.4 registry_file
记录filebeat处理日志文件的状态的文件
2.5 config_dir
如果要在本配置文件中引入其他位置的配置文件可以写在这里,需要写完整路径,但是只处理prospector的部分。
2.6 shutdown_timeout
在Filebeat关闭之前,等待发布者完成发送事件的时间。