log
sdtin
redis
udp
tcp
logstash
output.logstash:
enabled: true
hosts: ["127.0.0.1:5044"]
# Number of workers per Logstash host.
worker: 1
# Optionally load-balance events between Logstash hosts. Default is false.
#loadbalance: false
# Number of batches to be sent asynchronously to Logstash while processing new batches.
#pipelining: 2
##网络错误后尝试重新连接到Logstash之前等待的秒数。
#backoff.init: 1s
#网络错误后尝试连接到Logstash之前等待的最大秒数。默认值为60秒。
#backoff.max: 60s
##可选索引名称。默认索引名设置为filebeat,全部小写。
#index: ‘filebeat‘
##发布失败后重试发布事件的次数。
#max_retries: 3
##单个Logstash请求中要批量处理的最大事件数。默认值为2048。
#bulk_max_size: 2048
elasticsearch
output.elasticsearch:
enabled: true
hosts: ["localhost:9200"]
##协议 - either `http` (default) or `https`.
#protocol: "https"
##身份验证凭据-API密钥或用户名/密码
api_key: "id:api_key"
username: "elastic"
password: "changeme"
##通过索引操作在URL中传递的HTTP参数字典
#parameters:
#param1: value1
#param2: value2
# Number of workers per Elasticsearch host.
#worker: 1
##可选索引名称。默认值是“filebeat”加上日期并生成[filebeat-]年月日。
#index: "filebeat-%{[agent.version]}-%{+yyyy.MM.dd}"
# Optional ingest node pipeline. By default no pipeline will be used.
#pipeline: ""
# Optional HTTP path
#path: "/elasticsearch"
##要添加到每个请求的自定义HTTP头
#headers:
# X-My-Header: Contents of the header
##尝试索引操作的重试次数。如果索引操作在多次重试后没有成功,则事件将被删除。默认值为3。
#max_retries: 3
#单个Elasticsearch批量API索引请求中要批量处理的最大事件数。默认值为50。
#bulk_max_size: 50
##网络错误后尝试重新连接到Elasticsearch之前等待的秒数
#backoff.init: 1s
##网络错误后尝试连接到Elasticsearch之前等待的最大秒数。默认值为60秒。
#backoff.max: 60s
##在请求Elasticsearch失败之前配置HTTP请求超时。
#timeout: 90
kafka
file
output.file:
enabled: true
codec.json:
pretty: true
escape_html: true
path: "/data/logs/filebeat"
filename: filebeat_output.log
rotate_every_kb: 10000
number_of_files: 7
permissions: 0600
redis
output.redis:
enabled: true
codec.json:
pretty: false
escape_html: false
hosts: ["localhost:6379"]
key: filebeat
password: ‘*****‘
db: 0
##发布事件的Redis数据类型。如果数据类型为list,则使用RPUSH命令;如果数据类型为channel,则使用PUBLISH命令。默认值为list。
datatype: list
##发布事件到每个Redis的工作线程数。将此设置与loadbalance选项一起使用。例如,如果有2台主机和3台工作机,则总共启动6台工作机(每个主机3台)。
worker: 1
#如果设置为true并且配置了多个hosts或worker,则会将发布的事件负载平衡到所有Redis主机上。
#如果设置为false,则只向一个主机发送所有事件(随机确定),如果当前选定的主机无法访问,则将切换到另一个主机。
#默认值为true。
loadbalance: true
timeout: 5s
##发布失败后重试发布事件的次数。在指定的重试次数之后,通常会删除事件。
max_retries: 3
##网络错误后等待多久尝试重新连接到Redis。
backoff.init: 1s
##网络错误后尝试连接到Redis之前等待的最大秒数。默认值为60秒。
#backoff.max: 60s
#单个Redis请求或管道中要批量处理的最大事件数。默认值为2048。
bulk_max_size: 2048
console
output.console:
enabled: true
codec.json:
pretty: false
escape_html: false
原文:https://www.cnblogs.com/wshenjin/p/13656588.html