Ruby filter, load csv file to add field

hi,

i need to load a csv file in a ruby filter to add fields to the document.
will the csv file be loaded for each line of the input or only once ?

cdt
patrick

Each event/line.

1 Like

Please have a look into the ruby filter documentation and assess if it is possible for you to load your csv in the init => "" config of the filter to load it only once.

And did you have a look in the translate filter https://www.elastic.co/guide/en/logstash/current/plugins-filters-translate.html that might suits your usecase