I have used logstash's xpath filter to parse an xml file and get a specified attribute. However, I would like to replace this value to another value based on the mapping of a separated CSV file.
For example, I have used logstash to parse my log's "id3" attribute to get the value "000000" stored in the "Merchant Name" field. I would then want logstash to replace this value by comparing this to a separated csv file with the following lines of code
ID,MERCHANT NAME 000000,Store 1 000001,Store 2 000002,Store 3
After the comparison, i would like logstash to map the "Merchant Name" field to "Store 1" instead of "000000". If the mapped "id3" value is "000002", then I would like logstash to map the "Merchant Name" field to "Store 2".
Any help would be much appreciated.