# How to use Logstash to import csv file into elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-use-logstash-to-import-csv-file-into-elasticsearch/179727>\
**Category:** Logstash\
**Created:** [May 6, 2019, 8:08am UTC](https://discuss.elastic.co/t/how-to-use-logstash-to-import-csv-file-into-elasticsearch/179727 "2019-05-06T08:08:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![idris](https://avatars.discourse-cdn.com/v4/letter/i/13edae/32.png) [@idris](https://discuss.elastic.co/u/idris)\
**Post date:** [May 6, 2019, 8:08am UTC](https://discuss.elastic.co/t/how-to-use-logstash-to-import-csv-file-into-elasticsearch/179727/1 "2019-05-06T08:08:12Z")

</div>

Need help guys,

i need to store data (csv file) on elasticsearch , but i m confused about the way to do that .

May i have to install firstly logstash on docker compose and try configure it manually???  
What are the main steps ?

Thank you ,

idris

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 6, 2019, 8:09am UTC](https://discuss.elastic.co/t/how-to-use-logstash-to-import-csv-file-into-elasticsearch/179727/2 "2019-05-06T08:09:51Z")

</div>

We aren't all guys 🙂

How many CSV files are there? Do they change number and format?

---

<div class="post-metadata">

**Author:** ![idris](https://avatars.discourse-cdn.com/v4/letter/i/13edae/32.png) [@idris](https://discuss.elastic.co/u/idris)\
**Post date:** [May 6, 2019, 8:13am UTC](https://discuss.elastic.co/t/how-to-use-logstash-to-import-csv-file-into-elasticsearch/179727/3 "2019-05-06T08:13:21Z")

</div>

4 csv files to store on elasticsearch , i think they are the same format but how can i check on it ?i m not sure

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 6, 2019, 8:14am UTC](https://discuss.elastic.co/t/how-to-use-logstash-to-import-csv-file-into-elasticsearch/179727/4 "2019-05-06T08:14:10Z")

</div>

If there's just 4 and they are static, then look at this [https://www.elastic.co/blog/importing-csv-and-log-data-into-elasticsearch-with-file-data-visualizer](https://www.elastic.co/blog/importing-csv-and-log-data-into-elasticsearch-with-file-data-visualizer)

---

<div class="post-metadata">

**Author:** ![idris](https://avatars.discourse-cdn.com/v4/letter/i/13edae/32.png) [@idris](https://discuss.elastic.co/u/idris)\
**Post date:** [May 6, 2019, 8:26am UTC](https://discuss.elastic.co/t/how-to-use-logstash-to-import-csv-file-into-elasticsearch/179727/5 "2019-05-06T08:26:11Z")

</div>

how can i add data visualizer to kibana?  
i installed kibana and elasticsearch using docker compose

services:

zookeeper:  
image: rawmind/alpine-zk:3.4.10-0 #wurstmeister/zookeeper  
ports:  
- 2181:2181  
- 2888:2888  
- 3888:3888

kafka:  
image: wurstmeister/kafka:0.11.0.1  
depends\_on:  
- zookeeper  
ports:  
- "9092:9092"  
environment:  
KAFKA\_ZOOKEEPER\_CONNECT: zookeeper:2181  
KAFKA\_RESERVED\_BROKER\_MAX\_ID: "1001"  
KAFKA\_BROKER\_ID: "42"  
KAFKA\_ADVERTISED\_HOST\_NAME: "kafka"  
KAFKA\_CREATE\_TOPICS: "newsin:1:1,newsout:1:1,legalin:1:1,legalout:1:1,legalfr:1:1,lematinin:1:1,lematinout:1:1,24heuresin:1:1,24heuresout:1:1"

# search engine

elasticsearch:  
image: [docker.elastic.co/elasticsearch/elasticsearch:6.0.0](http://docker.elastic.co/elasticsearch/elasticsearch:6.0.0) #kiasaki/alpine-elasticsearch #[docker.elastic.co/elasticsearch/elasticsearch:5.6.3](http://docker.elastic.co/elasticsearch/elasticsearch:5.6.3)  
ports:  
- "9200:9200"  
- "9300:9300"  
environment:  
- xpack.security.enabled=false  
Volumes:  
- $PWD/elasticsearch:/usr/share/elasticsearch/data

# elasticsearch dashboard

kibana:  
image: perriea/alpine-kibana  
ports:  
- "5601:5601"  
environment:  
ELASTICSEARCH\_HOSTS: "[http://elasticsearch:9200](http://elasticsearch:9200)"  
links:  
- elasticsearch

connect:  
image: confluentinc/cp-kafka-connect:3.3.0  
ports:  
- 8083:8083  
depends\_on:  
- zookeeper  
- kafka  
volumes:  
- $PWD/connect-plugins:/connect-plugins

---

<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:** [June 3, 2019, 8:26am UTC](https://discuss.elastic.co/t/how-to-use-logstash-to-import-csv-file-into-elasticsearch/179727/6 "2019-06-03T08:26:26Z")

</div>

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