Hello,
I have a log file which is a mix of xml and regular (non xml) lines. I need to apply grok filer + xml filter to the lines that has xml block and apply only grok filter to the regular lines. For that I need help in extracting the xml block using the logstash filter but I am not able to do that. If I use the xml filter like:
xml { source => "message" target => "xml" }
it gets applied to all the messages and the lines without xml block in it are either dropped or comes back as _xmlparsefailure, also the lines with xml block are parsed correctly.
I need help in figuring out how to extract the xml block and apply xml filter only if it exists in message.
Thank you.