Combine Two csv fileds using key column in logstash/Elasticsearch

Hi,

I have two csv files like below

CSV1 :
ID,Number,Name,Gender
100,CHG0032798,Thor,Male

CSV2 :
ID.Drop
100,drop1

ISSUE:
I need to combine this csv fileds make it as one index like below
ID Number Gender Drop

I have trield scroll api,ruby in logstash but failed.
can u pls help the way to achieve this

I got the solution by using ruby filter plugin..if any one searching for it pls find the solution below.

ruby { code => '
require "csv"
CSV.foreach("csv2.csv") do |rec|
if rec[0] == event.get("")
event.set("",rec[1])
end
end
' }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.