# Logstash not creating an index in elasticsearch

**URL:** <https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231>\
**Category:** Logstash\
**Created:** [June 24, 2015, 5:38am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231 "2015-06-24T05:38:56Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [June 24, 2015, 5:38am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/1 "2015-06-24T05:38:56Z")

</div>

Below is my config file -

```
input {  
      file {
          path => "/home/pavan/Downloads/sample.csv"
	  type => "Sample"
          start_position => "beginning"
      }
}
filter {  
    csv {
        columns => ['cdatetime', 'address', 'district', 'beat', 'grid', 'crimedescr', 'ucr_ncic_code', 'latitude', 'longitude']
        separator => ","
    }
}

output {  
    elasticsearch {
	
        action => "index"
        host => "localhost"
        protocol => "http"
        index => "sample"
	cluster => "pavan"        
    }
      stdout {
        codec => rubydebug
     }
}

```

The problem is when I run `bin/logstash -f sample.conf` from terminal I get the following response `Logstash startup completed` but when I see the list of indices in Elasticsearch, it remains the same.

---

<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:** [June 24, 2015, 5:49am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/2 "2015-06-24T05:49:43Z")

</div>

It'll be a sincedb issue, delete that and you should be good (see the file input docs).

---

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [June 24, 2015, 6:36am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/3 "2015-06-24T06:36:28Z")

</div>

Can you please be more specific as I'm still a beginner with Logstash.

---

<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:** [June 24, 2015, 10:37pm UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/4 "2015-06-24T22:37:02Z")

</div>

Check out [https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-sincedb\_path](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-sincedb_path)

---

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [June 25, 2015, 6:23am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/5 "2015-06-25T06:23:06Z")

</div>

Sorry. It didn't solve my problem. Do you have any alternatives?

---

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [June 26, 2015, 10:20am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/6 "2015-06-26T10:20:13Z")

</div>

I'm sorry about the inconvenience Warkolm. I re-installed Logstash and after that I located all the .sincedb files which were in HOME directory and deleted it. After that my first index got created in elasticsearch but then when I try to index a new csv file, it fails. I again need to explicitly delete those sincedb files and index it again. Is there any way to autodelete .sincedb files?

---

<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:** [June 26, 2015, 10:29am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/7 "2015-06-26T10:29:39Z")

</div>

Are you doing it into the same file?

---

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [June 29, 2015, 6:10am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/8 "2015-06-29T06:10:25Z")

</div>

Yeah.I'm just changing the path in the same .config file. Is that the problem?

---

<div class="post-metadata">

**Author:** ![Lee\_PS](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@Lee\_PS](https://discuss.elastic.co/u/Lee_PS)\
**Post date:** [June 29, 2015, 1:33pm UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/9 "2015-06-29T13:33:27Z")

</div>

Hi

Hope it will solve your problem  
add sincedb\_path =\> "/home/pavan/Downloads/dbflile"  
it will create one file with name dbfile and this file keeps track of the current position of monitored log files.

Exmple  
input {  
file {  
path =\> "/home/pavan/Downloads/sample.csv"  
type =\> "Sample"  
start\_position =\> "beginning"  
sincedb\_path =\> "/home/pavan/Downloads/dbflile"  
}  
}

//Lee

---

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [June 30, 2015, 11:35am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/10 "2015-06-30T11:35:27Z")

</div>

Thanks Lee. It solved my problem.

---

<div class="post-metadata">

**Author:** ![Jimmy\_Shephard](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jimmy\_Shephard](https://discuss.elastic.co/u/Jimmy_Shephard)\
**Post date:** [October 18, 2016, 3:16pm UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/11 "2016-10-18T15:16:44Z")

</div>

Have the same problem, deleted the sincedb files but index still won't be created. Run logtsash with path to a logfile and there's no error in that file. Kinda blind to what's going on. Any ideas?

---

<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:** [October 19, 2016, 5:25am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/12 "2016-10-19T05:25:47Z")

</div>

If the file input's `ignore_older` option doesn't help you, please start a new thread for your problem.

---

<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, 4:33am UTC](https://discuss.elastic.co/t/logstash-not-creating-an-index-in-elasticsearch/24231/13 "2017-07-06T04:33:41Z")

</div>


