问题遇到的现象和发生背景
Filebeat无法读取多层级的日志文件(.txt)
操作环境、软件版本等信息
Ubuntu18.04+ELK7.13.4+Filebeat
尝试过的解决方法
读取只能读取到固定层级的目录上的文件,实在是不知道有什么方法可以达到
我想要达到的结果
文件结构层级如下图
想要 获取红色方块位置的日志文件,万分感谢
Filebeat无法读取多层级的日志文件(.txt)
Ubuntu18.04+ELK7.13.4+Filebeat
读取只能读取到固定层级的目录上的文件,实在是不知道有什么方法可以达到
文件结构层级如下图
想要 获取红色方块位置的日志文件,万分感谢
两个星号表示0到多个文件层级,比如:
- type: log
# Change to true to enable this input configuration.
tail_files: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /myhome/logs/**/*.log