toyokazu / fluent-plugin-xml-parser

fluentd XML parser plugin
MIT License
1 stars 7 forks source link

wild card catch #2

Open j1681358 opened 7 years ago

j1681358 commented 7 years ago

First of all this is a very good plugin for fluentd. Thank you for making it available for use. I was trying to use wind card to catch xml with same name or similar name to one field and send them to elastic search. For example I would like to have all opts on 1 field `<?xml version="1.0" encoding="UTF-8"?>

cat 34 acrandoom123 acrandoom876 acrandoom167 acrandoom109 acrandoom190 acrandoom579 acrandoom178 acrandoom119 acrandoom233 acrandoom211 acrandoom214 acrandoom215 acrandoom345 acrandoom347

` on online xml parser test it parses well(using wildcard////Opt/text()). Fluentd doesnt. Any suggestion how I can achive this. Also number of opt varies on my xml, so they could be only 1 or 100. I would like it to catch it as "Opt": "acrandoom123" "acrandoom876" "acrandoom167" and so on.

Please point me to right direction how this can be achieved.

Thank you in advance.

toyokazu commented 7 years ago

Hi,

First of all, this plugin is not maintained well now because current Meshlium supports JSON format and parsing XML is not required for me. So, currently, I have no plan to upgrade it to fluentd 0.14. By the way, this plugin just supports an attribute/value pair extraction from XML file as written in README.md and it does not support multiple values in a single attribute. For more flexible conversion, better implementation like filter_record_transformer is required ;(

https://docs.fluentd.org/v0.12/articles/filter_record_transformer

I'm sorry that I cannot make time to implement it now...

Best