仅将文件拍子配置为读取日志文件的最后5天

问题描述 投票:0回答:2

我在“ logs”文件夹中有以下目录格式的几个日志文件

2019-10-22
2019-10-21
2019-10-20
2019-10-19

每个文件夹上方都有Error.log文件。我想从文件拍中从2019-10-20到以上读取那些Error.log文件,并推送到弹性serch。我该如何使用filebeat.yml

这是我的filebaet.yml部分

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - d:\sites\*\logs\*\Error.log

  fields:
    level: error
    application: cms

  ### Multiline options
  multiline.pattern: '^([0-9]{4}-[0-9]{2}-[0-9]{2})'
  multiline.negate: true
  multiline.match: after
  pipeline: logpipeline
elasticsearch logging filebeat
2个回答
0
投票
- type: log enabled: true paths: - d:\annywhere\logs\*\Error.log ignore_older: 24h
© www.soinside.com 2019 - 2024. All rights reserved.