# How to load CSV file in logstash

**URL:** <https://discuss.elastic.co/t/how-to-load-csv-file-in-logstash/40950>\
**Category:** Logstash\
**Created:** [February 4, 2016, 11:22am UTC](https://discuss.elastic.co/t/how-to-load-csv-file-in-logstash/40950 "2016-02-04T11:22:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lovika\_Jain](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@Lovika\_Jain](https://discuss.elastic.co/u/Lovika_Jain)\
**Post date:** [February 4, 2016, 11:22am UTC](https://discuss.elastic.co/t/how-to-load-csv-file-in-logstash/40950/1 "2016-02-04T11:22:56Z")

</div>

Hi  
I am trying to load CSV file in logstash but it is not reading the file and not creating the index in elasticsearch

My Config file  
input {

```
file {
    type => "csv"
    path => "/root/installables/*.csv"
    start_position => beginning
}

```

}

filter {  
grok {  
match =\> { "message" =\> "%{COMBINEDAPACHELOG}" }  
}  
}  
output {  
elasticsearch {  
hosts =\> localhost  
index =\> "client"  
}  
}  
Could anybody tell how to load CSV file in logstash?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 4, 2016, 12:08pm UTC](https://discuss.elastic.co/t/how-to-load-csv-file-in-logstash/40950/2 "2016-02-04T12:08:16Z")

</div>

For one-shot imports of files where you don't need to support restarts of Logstash while the file is being processed I suggest you set `sincedb_path => "/dev/null"` for the file input or use the stdin input.

You should consult the file input documentation and read about sincedb files, because that's what's going on here; Logstash is waiting for more data to be added to the end of the file.

This question is very frequently asked so you'll find additional reading in the archives.

---

<div class="post-metadata">

**Author:** ![Lovika\_Jain](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@Lovika\_Jain](https://discuss.elastic.co/u/Lovika_Jain)\
**Post date:** [February 4, 2016, 12:10pm UTC](https://discuss.elastic.co/t/how-to-load-csv-file-in-logstash/40950/3 "2016-02-04T12:10:58Z")

</div>

I already tried placing since\_db , it is still now working!

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 4, 2016, 12:57pm UTC](https://discuss.elastic.co/t/how-to-load-csv-file-in-logstash/40950/4 "2016-02-04T12:57:45Z")

</div>

If you enable verbose logs by starting Logstash with `--verbose` you'll find more clues as to what's happening. We need those clues to debug the issue further.

---

<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:** [July 6, 2017, 5:13am UTC](https://discuss.elastic.co/t/how-to-load-csv-file-in-logstash/40950/6 "2017-07-06T05:13:03Z")

</div>


