I have an xml file that I need to ingest with Logstash, with specific fields. It has structure:
< Test>
< Type>
< Data>
..........
..........
< /Data>
< /Type>
< /Test>
I am trying to use multiline codec, in order to filter through the message and get the data I need with a specific pattern.
The data I only want to ingest is everything inside of < Data>......< /Data> and ignore the rest of the data.
I have following configuration, which seems to take for start each event, but ingests data until the next . I seem to get in each event < Data>< /Data> < /Test>< Test>< Type>
codec => multiline {
# pattern => ".< Data>."
pattern => "<(Data)|(Data)>"
negate => true
what => "previous"
}
How to take only everything in < Data>< /Data> into account?