XML Import with Logstash
I have read about all XML filter import examples I can find. However, I just cannot figure out how to get this specific xml format imported through logstash.
The government of Denmark provides a public XML feed with data from the motorregistry. I would like to import this data into elasticsearch.
I wish to store it, to play with the analysis and types of data..
Anyway, the format contains nodes with danish names from the source (sorry).
The repeating element for each registration is the node: ns:Statistik
I would like to just import the entire xml tree within ns:Statistik into a document type of the name "vehicle". The nodes should be converted into fields and the content with in, the value / nested object.
The XML file format can be found here:
Hardly any of my logstash.conf is working. I have gotten two different results when importing. I have succesfully imported the entire xml file into 1 document. I have succesfully imported each line into seperate documents.
But I don't understand the documentation of the XML filter apparently. CSV import etc. I know, and it seems so simply in comparison. The XML is really difficult to understand, and I cannot get any of the examples I've found on the forum nor stackoverflow to work either.
Hopefully one of you guys could provide me with a complete logstash conf, and from that I hopefully could learn how to do this with the XML filter in the future.
Thanks for reading