# Unable to create an index in elastic search through filebeat/ logstash in 5.2 version

**URL:** <https://discuss.elastic.co/t/unable-to-create-an-index-in-elastic-search-through-filebeat-logstash-in-5-2-version/146562>\
**Category:** Elasticsearch\
**Created:** [August 29, 2018, 4:32pm UTC](https://discuss.elastic.co/t/unable-to-create-an-index-in-elastic-search-through-filebeat-logstash-in-5-2-version/146562 "2018-08-29T16:32:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gvreddy](https://avatars.discourse-cdn.com/v4/letter/g/2bfe46/32.png) [@gvreddy](https://discuss.elastic.co/u/gvreddy)\
**Post date:** [August 29, 2018, 4:32pm UTC](https://discuss.elastic.co/t/unable-to-create-an-index-in-elastic-search-through-filebeat-logstash-in-5-2-version/146562/1 "2018-08-29T16:32:30Z")

</div>

Hi can somebody help me on this, am unable to create an index in elastic search, in this scenario i have already created "test1" index and its log path previously for testing purpose and deleted in elastic search, and now when i am recreating same index and using same path, index was not creating in elastic search, as am new to ELK can someone help me on this

My work flow is Filebeat ---\> Logstash ---\> Elasticsearch

filebeat.yml file

#======== Filebeat prospectors =============================

filebeat.prospectors:

- input\_type: log  
paths:

- /var/lib/docker/volumes/test1.log  
document\_type: test1

- input\_type: log  
paths:

- /var/lib/docker/volumes/test2.log  
document\_type: test2

#----------------------------- Logstash output -----------------------------  
output.logstash:

# The Logstash hosts

hosts: ["localhost:5044"]

# =============================================== logstash.conf

```
input {
     beats {
     port => 5044
     }
 }

 filter {
     json {
     source => "message"
     target => "log"
     }
 }
 output {
     if [type]=="test1" {
     elasticsearch {
     hosts => ["locahost:9200"]
     index => "test1"
     }
     }
     if [type]=="test2" {
     elasticsearch {
     hosts => ["localhost:9200"]
     index => "test2"
     }
     }
 }

```

```auto

```

---

<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:** [September 26, 2018, 4:32pm UTC](https://discuss.elastic.co/t/unable-to-create-an-index-in-elastic-search-through-filebeat-logstash-in-5-2-version/146562/2 "2018-09-26T16:32:30Z")

</div>

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