作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在unix服务器上安装了filebeat rpm,并且尝试读取包含多行日志的3个文件,并且我对使用filebeat进行多行匹配有所了解,但我想知道是否可以匹配3个单独的日志。
谢谢
最佳答案
您可能基本上需要multiple prospectors,
示例(未测试)
filebeat.prospectors:
- input_type: log
paths:
- /var/log/app1/file1.log
multiline.pattern: '^\[[0-9]{4}-[0-9]{2}-[0-9]{2}'
multiline.negate: false
multiline.match: after
- input_type: log
paths:
- "/var/log/app2/file2.log"
- input_type: log
paths:
- "/var/log/app3/file3.log"
negate: true
和match: after
=>指定与指定模式不匹配的任何行都属于的前一行。 关于elasticsearch - Fileabeat-具有多行日志的多个文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44168352/
我在unix服务器上安装了filebeat rpm,并且尝试读取包含多行日志的3个文件,并且我对使用filebeat进行多行匹配有所了解,但我想知道是否可以匹配3个单独的日志。 谢谢 最佳答案 您可能
我是一名优秀的程序员,十分优秀!