# Logstash won't create index in ES

**URL:** <https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051>\
**Category:** Logstash\
**Created:** [June 22, 2015, 3:26am UTC](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051 "2015-06-22T03:26:01Z")\
**Posts on this page:** 7\
**Page:** 2

<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:** [June 24, 2015, 4:00am UTC](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051/21 "2015-06-24T04:00:51Z")

</div>

> [@bluethundr](#):
>
> Started up elasticsearch and started up logstash on the command line using this line:
> 
> ```
> logstash -e 'input { stdin { } } output { elasticsearch { host => localhost } }'
> 
> ```
> 
> And lo and behold!!! LS is now able to create indexes in ES!!
> 
> ```
> #curl http://localhost:9200/_cat/indices
> red open .kibana 1 1
> red open logstash-2015.06.24 5 1
> 
> ```

Yes, but why is the cluster red? Did you issue the \_cat/indices RPC immediately after the index was created? After creating an index the cluster should go yellow within a second or two.

> [@bluethundr](#):
>
> So easy right? Well not quite. Because, if I go back into the yaml file and alter one parameter. Only ONE parameter, it stops working again. If I try to change the cluster name to:
> 
> ```
> cluster.name: jokefire
> 
> ```
> 
> Fired logstah back up and got this error:

Yes, because Logstash by default attempts to join a cluster named "elasticsearch" (see the [documentation of the `cluster` parameter](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-cluster)) and when you rename the cluster Logstash won't find any cluster with that name to connect to. Make sure ES and LS agree on the cluster name, or make Logstash use HTTP instead with [`protocol => http`](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-protocol).

---

<div class="post-metadata">

**Author:** ![bluethundr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluethundr/32/409_2.png) [@bluethundr](https://discuss.elastic.co/u/bluethundr)\
**Post date:** [June 24, 2015, 4:06am UTC](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051/22 "2015-06-24T04:06:01Z")

</div>

```
Yes, but why is the cluster red? Did you issue the _cat/indices RPC immediately after the index was created? After creating an index the cluster should go yellow within a second or two.

```

Yep. You're right. It was red because I curled the indexes a little too quickly. I started from scratch with the default yaml file, plus I added one more node.

```
green open .kibana 1 1 2 0 9.5kb 4.8kb
green open logstash-2015.06.24 5 1 7 0 38.2kb 19.2kb

```

So, I'm all good there now.

```
Yes, because Logstash by default attempts to join a cluster named "elasticsearch" (see the documentation of the cluster parameter) and when you rename the cluster Logstash won't find any cluster with that name to connect to. Make sure ES and LS agree on the cluster name, or make Logstash use HTTP instead with protocol => http.

```

Ok that makes sense. Is there an easy way to get LS to look for a different cluster name? One of my choosing? Or maybe just using http mode would be easier.

Thanks

---

<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:** [June 24, 2015, 5:34am UTC](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051/23 "2015-06-24T05:34:06Z")

</div>

> Is there an easy way to get LS to look for a different cluster name?

Yes, see the `cluster` parameter whose documentation I linked to.

---

<div class="post-metadata">

**Author:** ![bluethundr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluethundr/32/409_2.png) [@bluethundr](https://discuss.elastic.co/u/bluethundr)\
**Post date:** [June 24, 2015, 4:17pm UTC](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051/24 "2015-06-24T16:17:38Z")

</div>

Ok, thanks! I'll check it out.

---

<div class="post-metadata">

**Author:** ![UsreTX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/usretx/32/5388_2.png) [@UsreTX](https://discuss.elastic.co/u/UsreTX)\
**Post date:** [October 20, 2015, 6:59pm UTC](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051/25 "2015-10-20T18:59:58Z")

</div>

I seem to be having a similar issue. Fresh install of all the latest from that tutorial, and logstash isn't creating indexes. help

---

<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:** [October 20, 2015, 8:28pm UTC](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051/26 "2015-10-20T20:28:23Z")

</div>

Please start your own thread for this 🙂

---

<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:25am UTC](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051/27 "2017-07-06T05:25:59Z")

</div>

Closed on July 6, 2017, 5:25am UTC



[Previous page](https://discuss.elastic.co/t/logstash-wont-create-index-in-es/24051.md?page=1)
