Custom Multiline Parsing

I have a Log file as follows:

===================================== REQUEST 03-09-2019 01:12:25.808599 REF:5001462 =========================================
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

===================================== RESPONSE 03-09-2019 01:12:27.434655 Ref:5001462 =========================================

There is a request and then a response. Any idea how it can be parsed? I would need the whole Request XML and Response XML in a single row as well as the request and response time. Both have the same Ref field.


I would start with

    grok {
        match => { "message" => "=+ %{DATA:header} =+
%{GREEDYDATA:[@metadata][xml]}" }
    xml { source => "[@metadata][xml]" target => "theXML" force_array => false }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.