Do you have any idea or example how in ruby plugin (in logstash filter) invoke translate plugin and then collect and use the translated data again in ruby plugin?
Not sure if that is possible
What is your specific use case ?
I have xml Data input which is treated by a ruby code in Logstash filter.
I have to translate xml Fields which is done directly in ruby. This made ruby code huge.
That's way I've thought to divide the translation code by using translate plugin with translated entries in a file which is more easy to maintain and evolve as a dictionary file.
I suggest your parse your XML data using logstash XML filter
Then apply translate filter to the field you want to enrich
Then you can use ruby filter if you want to add any custom logic that is not supported by logstash filters
Thank you so much.
Unfortunately, I didn't do that as you have suggested.
I just used xml plugin to parse the xml files and then to pass the xpath to ruby in which I do translation as well.
I should review all my code and change it in order to call translate filter in xml one.
To avoid that, do you have another solution with witch ruby can call translate filter?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.