Logstash XML file with multiple patterns

I have an xml file as an input in Logstash and ElasticSeach as output.
My xml has multiple patterns, where my xml file looks like:
< Header>
< Value1>xyz< /Value1>
< FileName>name< /FileName>
< System>test< /System>
< Header>
< parameter value="xyz" system="xyz" ShortDescription="xyz">
< LongDescription>xyz < /LongDescription>
< Length>xyz< /Length>
< /parameter>
< differentparameter value="xyz" system="xyz" ShortDescription="xyz">
< LongDescription>xyz < /LongDescription>
< Length>xyz< /Length>
< /differentparameter>

In my input I am trying:
codec => multiline {
pattern => ".<parameter."
# negate => true
# what => "previous"
#}

When I use this, all my values in show up correctly, the others dont.
Is there a way to specify multiple patterns for xml file, for example:
pattern => ".<Header."
&
pattern => ".<parameter."
&
pattern => ".<differentparameter."

Format the XML as preformatted text so we can see what it looks like. Always do the same thing with configuration snippets and logs.

Ok I changed it now, hope its clearer.
Basically I am trying to get Logstash to recognize that there are multiple patterns for my xml and specify them in the pattern configuration in my input.

<(Header|parameter|differentparameter)

That does the trick, thank you!

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