# Best logstash plugin or advice to ingest this csv file on elasticsearch

**URL:** <https://discuss.elastic.co/t/best-logstash-plugin-or-advice-to-ingest-this-csv-file-on-elasticsearch/249686>\
**Category:** Logstash\
**Created:** [September 23, 2020, 5:30pm UTC](https://discuss.elastic.co/t/best-logstash-plugin-or-advice-to-ingest-this-csv-file-on-elasticsearch/249686 "2020-09-23T17:30:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nino](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nino](https://discuss.elastic.co/u/nino)\
**Post date:** [September 23, 2020, 5:30pm UTC](https://discuss.elastic.co/t/best-logstash-plugin-or-advice-to-ingest-this-csv-file-on-elasticsearch/249686/1 "2020-09-23T17:30:49Z")

</div>

Hello all,

i have this csv file that i need to send to elastic:

alwats the same csv structure

```
field_1,field_2,field_3,field_4,field_5,field_6
888,0000000A,S,4,2020-09-08 00:00:00.0,name
999,0000000C,S,4,2020-09-08 00:00:00.0,name
222,0000000B,S,4,2020-09-08 00:00:00.0,name

```

....

This file arrives every day to a folder (and filebeat sends csv to logstash), I need to read the whole file containing several lines and insert on elastic each line in a different document. What would be the best way to go?

Best regards

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [September 23, 2020, 5:50pm UTC](https://discuss.elastic.co/t/best-logstash-plugin-or-advice-to-ingest-this-csv-file-on-elasticsearch/249686/2 "2020-09-23T17:50:13Z")

</div>

Unless you have taken steps to prevent it, filebeat will send each line of the file as a separate event. You can parse those events using [csv](https://www.elastic.co/guide/en/logstash/current/plugins-filters-csv.html) filter.

---

<div class="post-metadata">

**Author:** ![nino](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nino](https://discuss.elastic.co/u/nino)\
**Post date:** [September 23, 2020, 6:12pm UTC](https://discuss.elastic.co/t/best-logstash-plugin-or-advice-to-ingest-this-csv-file-on-elasticsearch/249686/3 "2020-09-23T18:12:05Z")

</div>

Thanks Badget,

let me try with csv plugin to see if fits

Best regards

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 21, 2020, 6:12pm UTC](https://discuss.elastic.co/t/best-logstash-plugin-or-advice-to-ingest-this-csv-file-on-elasticsearch/249686/4 "2020-10-21T18:12:23Z")

</div>

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