elasticsearch - 多行正则表达式不适用于filebeat,但可以在goplay测试器中使用

标签 elasticsearch logstash elastic-stack filebeat

我有filebeat-> ES setup.no logstash。
我有如下日志:

2020 Feb 11 06:56:30:554 GMT -0500 DEBUG [LogPool$0] com.ZU.digital.utilityservices.logging.Logging - EAI-DEBUG | ProcessOrderStatus.rule: Id - : OrderStatusNotification Payload : <?xml version="1.0" encoding="UTF-8"?>
<ns0:OSN >
ns0:merchantID200142</ns0:merchantID>
ns0:orderCode2003787391047586</ns0:orderCode>
ns0:lastEventCAPTURED</ns0:lastEvent>
ns0:paymentAmount12.90</ns0:paymentAmount>
ns0:paymentCurrencyEUR</ns0:paymentCurrency>
ns0:paymentCreditDebitINDC</ns0:paymentCreditDebitIND>
ns0:additionalData
ns0:data
ns0:name/
ns0:value/
</ns0:data>
</ns0:additionalData>
</ns0:OSN>
2020 Feb 11 06:56:30:554 GMT -0500 DEBUG [LogPool$0] com.ZU.digital.utilityservices.logging.Logging - Masking input XML in maskEntireXml

我有多行模式为:
multiline.pattern: '^[0-9]{4}[[:space:]]'

  # Defines if the pattern set under pattern should be negated or not. Default is false.
  multiline.negate: true

  # Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
  # that was (not) matched before or after or as long as a pattern is not matched based on negate.
  # Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
  multiline.match: after

但每行都被视为单个事件。正则表达式已在playgolang中进行了测试,并且工作正常。我希望日志在日期之间成为单个事件

最佳答案

求反后得到解决:true

关于elasticsearch - 多行正则表达式不适用于filebeat,但可以在goplay测试器中使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60223274/

相关文章:

elasticsearch - Graylog + Elasticsearch-如何使用以下模式通过正则表达式查询

python - 如何使用 python 更新 Elastic Search ( Kibana ) 中可用的大量 Json 数据

elasticsearch - Elasticsearch 地理空间搜索实现

logstash - 如何获得总结的 Varnishlog

Mysql 查询到 Elasticsearch 查询转换

python - Elasticsearch 搜索 API 未返回所有结果

elasticsearch - 如何区分几个应该从句的命中

elasticsearch - Elasticsearch 错误-[前缀]查询不支持[前缀]

ubuntu - 为什么 Elasticsearch 是 8x。以交互方式启动但不是作为服务 Ubuntu 20.04?

elasticsearch - Logstash收集的编解码器从收集的空消息中获取空消息