filebeat6.0日志收集配置详解(不定时更新)

版权声明:使用中有任何问题,可以留言,能解答尽量解答。交流q群773718900 https://blog.csdn.net/liyyzz33/article/details/90268522

请参考配置文件的注释添加

filebeat.prospectors:
#指定输入类型 input_type: log|stdin
- input_type: log
#支持基本的正则,所有golang glob都支持,支持/var/log/*/*.log
  paths:
    - /data/logs/*/*.log
  
  #支持正则 排除匹配的文件
  exclude_files: [access.log]
  
  fields:
    log_source: php
    log_type: php
  tail_files: true
  scan_frequency: 60s
  backoff: 10s
  #filebeat 多行日志的处理
  multiline.pattern: ^[0-9]|^\[
  multiline.negate: true
  multiline.match: after

#使用redis转存
output.redis:
      hosts: ["192.168.1.1"]
      port: 6379
      key: "php"
      password: "****"
      db: 0 
      timeout: 5

猜你喜欢

转载自blog.csdn.net/liyyzz33/article/details/90268522