解决如何拆分多个自配置方便管理,如下:
参考:
https://www.elastic.co/guide/en/beats/filebeat/current/_live_reloading.html
#============================= Filebeat prospectors ===============================
filebeat.prospectors:
filebeat.config.prospectors:
enabled: true
path: ${path.config}\configs\*.yml
# Set to true to enable config reloading
reload.enabled: true
# Period on which files under path should be checked for changes
reload.period: 10s
在configs目录下存放子配置类似与nginx的include.
#filebeat.prospectors:
# Each - is a prospector. Most options can be set at the prospector level, so
# you can use different prospectors for various configurations.
# Below are the prospector specific configurations.
- type: log
# Change to true to enable this prospector configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- D:\logs\server\*.log
#- c:\programdata\elasticsearch\logs\*
fields:
from: s777
# review: 1