是时候用 ES 拯救发际线啦

filebeat可以采集历史日志吗?

匿名 | 发布于2018年07月23日 | 阅读数:6662

系统提示:这个人太懒了,什么问题描述都没有写!

已邀请:

rochy - rochy_he

赞同来自: ss

filebeat.inputs:
- type: log
ignore_older: 24h
paths:
- /var/log/system.log
- /var/log/wifi.log

ignore_older
以下是官方介绍:
If this option is enabled, Filebeat ignores any files that were modified before the specified timespan. Configuring ignore_older can be especially useful if you keep log files for a long time. For example, if you want to start Filebeat, but only want to send the newest files and files from last week, you can configure this option.

You can use time strings like 2h (2 hours) and 5m (5 minutes). The default is 0, which disables the setting. Commenting out the config has the same effect as setting it to 0.

rochy - rochy_he

赞同来自:

可以,只需要在配置文件中设置日志路径和日志有效时间即可

ss

赞同来自:

麻烦您可以指出那个设置有效时间是那个参数吗?谢谢

ss

赞同来自:

感谢您的回复,问题已解决,就是需要等待一段时间可以在kibana界面中看到采集的日志收索引!

要回复问题请先登录注册