filebeat日志采集去除含test字符的行
可以使用filebeat的include_lines和exclude_lines选项来实现。
首先,设置include_lines选项,指定只采集含有非test字符的行:
filebeat.inputs:
- type: log
paths:
- /path/to/your/logfile
exclude_lines: ['test']
然后,设置exclude_lines选项,指定采集所有行,但去除含有test字符的行:
filebeat.inputs:
- type: log
paths:
- /path/to/your/logfile
include_lines: ['.*']
exclude_lines: ['test']
以上两种方法都可以达到去除含有test字符的行的效果,具体选择哪种方法取决于你的需求和日志格式。
原文地址: https://www.cveoy.top/t/topic/b5Y3 著作权归作者所有。请勿转载和采集!