Logstash CSV filter plugins

Hi Team,

I am trying to read csv file and storing it in elasticsearch.
Is there any way to read column from file itself (header of csv file ) in logstash "csv filter plugins". currently I am manually setting up the column name.

logstash config I am using:

filter {
csv {
source => "message"
separator => ","
skip_header => "true"
columns => ["identity/LineItemId", "identity/TimeInterval", "bill/InvoiceId", "bill/InvoicingEntity", "bill/BillingEntity", "bill/BillType", "bill/PayerAccountId" ] }
mutate {remove_field => [ "event", "message"]}
}

Add to

csv{...
        autodetect_column_names => true
        autogenerate_column_names => true
...
}

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