filebeat将日志文件标记为非活动状态,即使其中有未读内容

filebeat将日志文件标记为非活动状态,即使其中有未读内容,filebeat,Filebeat,我在centos服务器上使用filebeat版本5.6.16将日志从路径/opt/news bff/logs/Icis.Genesis*.log 有许多匹配的日志文件 -rw-r--r--. 1 root root 5049 Sep 25 10:30 Icis.Genesis.News.Bff.Api-2019092510.log -rw-r--r--. 1 root root 1551 Sep 25 12:15 Icis.Genesis.News.Bff.Api-2019092512.lo

我在centos服务器上使用filebeat版本5.6.16将日志从路径
/opt/news bff/logs/Icis.Genesis*.log

有许多匹配的日志文件

-rw-r--r--. 1 root root  5049 Sep 25 10:30 Icis.Genesis.News.Bff.Api-2019092510.log
-rw-r--r--. 1 root root  1551 Sep 25 12:15 Icis.Genesis.News.Bff.Api-2019092512.log
-rw-r--r--. 1 root root  2650 Sep 25 13:55 Icis.Genesis.News.Bff.Api-2019092513.log
-rw-r--r--. 1 root root 39447 Sep 25 14:50 Icis.Genesis.News.Bff.Api-2019092514.log
-rw-r--r--. 1 root root  6191 Sep 25 15:31 Icis.Genesis.News.Bff.Api-2019092515.log
但问题是,filebeat会为每个文件打开harvester,五分钟后会将其标记为非活动,并且不会发送任何日志。
/var/lib/filebeat/registry
文件为空

我使用puppet对多个centos服务器进行了预览,并在其上插入了filebeat。 10次中有5次,filebeat会选择没有任何问题的日志文件。 否则我就有这个问题了

如果删除注册表文件并重新启动服务,则可以正常工作

filebeat浏览器如下所示:

filebeat:
  prospectors:
    - input_type: log
      paths:
        - /opt/news-bff/logs/Icis.Genesis*.log
      encoding: plain
      fields_under_root: false
      document_type: log
      scan_frequency: 10s
      harvester_buffer_size: 16384
      max_bytes: 10485760`

logs:
2019-09-25T12:16:01+01:00 INFO Harvester started for file: /opt/news-bff/logs/Icis.Genesis.News.Bff.Api-2019092512.log
2019-09-25T12:16:10+01:00 INFO Non-zero metrics in the last 30s: filebeat.harvester.open_files=1 filebeat.harvester.running=1 filebeat.harvester.started=1 libbeat.logstash.publish.read_bytes=36
2019-09-25T12:16:40+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=36
2019-09-25T12:17:10+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=36
2019-09-25T12:17:40+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=36
2019-09-25T12:18:10+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=36
2019-09-25T12:18:40+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=36
2019-09-25T12:19:10+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=36
2019-09-25T12:19:40+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=30
2019-09-25T12:20:10+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=36
2019-09-25T12:20:40+01:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read_bytes=36
2019-09-25T12:21:06+01:00 INFO File is inactive: /opt/news-bff/logs/Icis.Genesis.News.Bff.Api-2019092512.log. Closing because close_inactive of 5m0s reached.