# Bulk Upload Csv Files Into Standalone ELK Stack In Docker

**URL:** https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317
**Category:** Kibana
**Tags:** docker
**Created:** [October 3, 2023, 2:03pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317 "2023-10-03T14:03:36Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Ethan777100](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethan777100/32/70366_2.png) [@Ethan777100](https://discuss.elastic.co/u/Ethan777100)
#### Post date: [October 3, 2023, 2:03pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/1 "2023-10-03T14:03:36Z")

</div>

I have a bunch of csv files I wish to ingest into Elasticsearch/Kibana that are localhost in a docker containers.

Wish to seek advice on how I can best ingest these csv files that have 100,000+ rows and be represented as 1 data-index within Elasticsearch.

The data I have on hand is not allowed to upload onto any online cloud.

Do I require logstash in my use case? I have problems setting up the logstash container in proper manner. I cannot get my logstash container to connect to my elasticsearch container.

---

<div class="post-metadata">

### Author: ![Ethan777100](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethan777100/32/70366_2.png) [@Ethan777100](https://discuss.elastic.co/u/Ethan777100)
#### Post date: [October 6, 2023, 4:27pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/2 "2023-10-06T16:27:57Z")

</div>

Please help me.

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [October 27, 2023, 10:11pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/3 "2023-10-27T22:11:57Z")

</div>

Yes, the best way to achieve this would be to use Logstash.

You can use the `file` input type to read the data into a Logstash pipeline.  
Then you can use the `csv` filter to parse the input text as CSV data

> [@Ethan777100](#):
>
> I cannot get my logstash container to connect to my elasticsearch container.

You can try adding the error message in a post to the folks in the #Logstash forum area.

---

<div class="post-metadata">

### Author: ![Ethan777100](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethan777100/32/70366_2.png) [@Ethan777100](https://discuss.elastic.co/u/Ethan777100)
#### Post date: [October 28, 2023, 3:37am UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/4 "2023-10-28T03:37:57Z")

</div>

Thank you.

So its just Logstash Container connect to Kibana?

Do I even need Elasticsearch docker container?

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [November 1, 2023, 11:26pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/5 "2023-11-01T23:26:29Z")

</div>

In regards to how to bulk upload CSV files, it doesn't matter how the ELK components are installed. They can be installed on Docker, or on different hardware, or they can be all local on a single machine.

Using a Logstash configuration like this, you can bulk upload data from CSV files into Elasticsearch.

```auto
input { 
    file { 
        path => "/path/to/your-file.csv" 
        start_position => "beginning" 
    } 
}
filter { 
    csv { 
        columns => ["column1", "column2", "column3"] 
    } 
}
output { 
    elasticsearch { 
        hosts => ["your-elasticsearch:9200"] 
        index => "your-index" 
    } 
}

```

---

<div class="post-metadata">

### Author: ![Ethan777100](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethan777100/32/70366_2.png) [@Ethan777100](https://discuss.elastic.co/u/Ethan777100)
#### Post date: [November 1, 2023, 11:47pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/6 "2023-11-01T23:47:53Z")

</div>

Thanks for the help.

Can I just check for path =\> "/path/to/your-file.csv"

This path will need to be iterated in a loop because I have multiple folders of csv within the same Tree to cycle thru.

How to include in this configuration?

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [November 6, 2023, 10:45pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/7 "2023-11-06T22:45:43Z")

</div>

> [@Ethan777100](#):
>
> This path will need to be iterated in a loop because I have multiple folders of csv within the same Tree to cycle thru.
> 
> How to include in this configuration?

You can [provide an array for the path, and use patterns in the path strings](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-options).

I recommend reading through the pages of docs for the parts that are involved and get familiar with how you can configure things

- [File input plugin | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html)
- [Csv filter plugin | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-filters-csv.html)
- [Elasticsearch output plugin | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html)

---

<div class="post-metadata">

### Author: ![Ethan777100](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethan777100/32/70366_2.png) [@Ethan777100](https://discuss.elastic.co/u/Ethan777100)
#### Post date: [November 14, 2023, 6:20am UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/8 "2023-11-14T06:20:39Z")

</div>

@tsullivan@stephenb

I have just git clone all 3 repos

Not sure if I shld clone them into same directory space as my logstash docker image folder.

Where / how should I organise my logstash workspace?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1ca1426a4e071a60b5e0ec9435186ea444a540b6.png)

PS: in docker-env, 1 level up. ES Kib is here. This docker-compose.yml is to create docker-env Image.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/4/1492203b94267804c6848a722e5bf3b5c5312364.png)

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [November 15, 2023, 9:45pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/9 "2023-11-15T21:45:59Z")

</div>

You shouldn't have to install the plugins for file input, elasticsearch output, and csv input filter, I believe those come with Logstash.

Since you have questions about using the Logstash plugins, you should create a new topic in #Logstash.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [November 15, 2023, 11:21pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/10 "2023-11-15T23:21:24Z")

</div>

@Ethan777100 ....

Lets stick to 1 thread, please... as we have covered much of this in the other thread... two topics just confuse everyone.

I am going to close this topic, and we can continue in this one

We have solved most of this

> [@Setting Up Logstash In Docker-Compose For Bulk Ingest Of CSV Files In Local Machine](https://discuss.elastic.co/t/setting-up-logstash-in-docker-compose-for-bulk-ingest-of-csv-files-in-local-machine/346916/25):
>
> I have changed my file space to be local as per Pls disregard the "OneDrive" ref inside my path. Its basically Windows 11's Documents folder I'm running my docker-env now. Hope this solves and we can continue troublshooting.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [November 15, 2023, 11:21pm UTC](https://discuss.elastic.co/t/bulk-upload-csv-files-into-standalone-elk-stack-in-docker/344317/11 "2023-11-15T23:21:29Z")

</div>


