我希望我的 logstash 过滤器配置显示 Soap 消息和异常堆栈跟踪。我能够让它们单独工作,但不能一起工作。
任何人都可以让我知道它是否可行或者我在下面的代码中做错了吗?
filter {
## 1. To show stacktrace
multiline {
type => "myLog"
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)"
what => "previous"
}
## 2. To show the complete SOAP Sales with request/response.
## multiline {
## type => "myLog"
## pattern => "<MySalesDetails"
## negate => true
## what => "previous"
## }
## multiline {
## type => "myLog"
## pattern => "<MySalesResponse"
## negate => true
## what => "previous"
## }
最佳答案
我不是正则表达式方面的专家,但我相信您可以将所有模式组合成一个。
关于elasticsearch - 如何在多行中定义多个模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20264485/