# New index not created

**URL:** <https://discuss.elastic.co/t/new-index-not-created/173209>\
**Category:** Logstash\
**Created:** [March 20, 2019, 7:07pm UTC](https://discuss.elastic.co/t/new-index-not-created/173209 "2019-03-20T19:07:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![teamg](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@teamg](https://discuss.elastic.co/u/teamg)\
**Post date:** [March 20, 2019, 7:07pm UTC](https://discuss.elastic.co/t/new-index-not-created/173209/1 "2019-03-20T19:07:23Z")

</div>

I want two of my hosts to write to a different index. Based on the articles I've read on here this output statement in /etc/logstash/conf.d/input.conf should create a new index when it finds these two hosts....but it's not. Kibana only shows the filebeat-\* but these two hosts are no longer appearing in Discover. Where is the data going? I don't see any errors on start up. Do I need to define the new index somewhere before the below statement will work?

> output {  
> if [host.name] in ["lab4a", "lab4b"] {  
> elasticsearch {  
> index =\> "lab4-%{+YYYY.MM.dd}"  
> }  
> }  
> }

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 20, 2019, 7:23pm UTC](https://discuss.elastic.co/t/new-index-not-created/173209/2 "2019-03-20T19:23:18Z")

</div>

That should be if [host][name] ...

---

<div class="post-metadata">

**Author:** ![teamg](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@teamg](https://discuss.elastic.co/u/teamg)\
**Post date:** [March 20, 2019, 7:36pm UTC](https://discuss.elastic.co/t/new-index-not-created/173209/3 "2019-03-20T19:36:28Z")

</div>

Yes, that's what I was missing. Thanks @Badger

---

<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:** [April 17, 2019, 7:37pm UTC](https://discuss.elastic.co/t/new-index-not-created/173209/4 "2019-04-17T19:37:40Z")

</div>

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