The output shows the body field does contain XML (i.e. packetbeat is capturing it), however logstash just refuses to parse the XML for me. also, it doesn't seem to add_tag either, but will remove fields if i put them in the same xml {} block.
The xml in the body of the payload is valid (and i've simplified it to just one tag value and it still doesn't parse.
Apologies - I am using the beats input plugin (file not shown). The xml I’m trying to parse is in the http body...which gets presented by beats (in the ruby output) but trying to then parse this field with the xml filter just doesn’t seem to do anything
So, after extensive testing I've learnt a few things;
source => needs to map to a simple field - e.g. "xml_content" - to achieve this I used an earlier mutux to copy the field add_field => {"xml" => "%{[http][request][body]}" }
There appears to be a bug in packetbeat where if the http body > 1024 bytes it doesn't send it to either logstash or elasticsearch (tried both configurations).
I've got successful parsing otherwise. I'll raise a new bug for the payload size issue.
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.