Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

容器频繁创建,filebeat registry文件逐步增大,资源占用增加 #253

Open
silenceper opened this issue Oct 29, 2019 · 5 comments

Comments

@silenceper
Copy link

虽然看到在filebeat中的prospectors配置了如下参数,保证可以清理state信息

  tail_files: false
  close_inactive: 2h
  close_eof: false
  close_removed: true
  clean_removed: true
  close_renamed: false

但是有个问题就是,这个目录下的prospectors.d下的文件是动态生成的,在destory container 时候,该config文件会被删除,而registry状态信息文件一直在增加

@wangycc
Copy link

wangycc commented Nov 12, 2019

tail_files: false # pod 在每次发布会产生新的日志文件,这样新日志不丢吗?

@silenceper
Copy link
Author

tail_files: false # pod 在每次发布会产生新的日志文件,这样新日志不丢吗?

pod的新建就是一个新的filebeat配置文件了

@wangycc
Copy link

wangycc commented Nov 12, 2019

tail_files: false # pod 在每次发布会产生新的日志文件,这样新日志不丢吗?

pod的新建就是一个新的filebeat配置文件了

scan-frequencyd默认是10s扫描一次
我看错了,就该设置为false,这样每次新文件都是文件首开始读取

@yuline
Copy link

yuline commented Jan 13, 2020

各位的解决方法是什么。

@silenceper
Copy link
Author

发现是在log-pilot进行重启之后,假设这中间又容器销毁(包括log-pilot),registry中会遗留下这些无法日志文件,即便filebeat启动之后,也无法被删除;

想到一个解决办法是在log-pilot每次启动之前,重置一下registry文件内容(只保留当前已有的日志文件)

yuline added a commit to yuline/log-pilot that referenced this issue May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants