filebeat.config.prospectors

本文介绍了如何使用Filebeat通过拆分配置文件并利用动态加载功能进行方便的管理。参考Elastic官方文档,建议在configs目录下创建子配置文件,类似于nginx的include机制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

解决如何拆分多个自配置方便管理,如下:
参考:
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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值