Wow, thanks for the help! This is working very nicely!
Here's what I wound up with:
input {
tcp {
mode => "client"
host => "my-host"
port => "12345"
codec => multiline {
pattern => "<Operation1>|<Operation2>|<Operation3>|<Operation4>|<Operation5>"
negate => "true"
what => "previous"
}
type => "resource-usage"
tags => ["xml"]
}
}
filter {
if "xml" in [tags] {
xml {
source => "message"
target => "xml_content"
}
}
}
Followup question: I'd like my document to contain a field named "Operation" that indicates which XML element this stanza started with (e.g. "Operation1", "Operation2", etc as seen in the multiline pattern tag). Is there a handy way to do that in the XML filter?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.