# "Index" output setting

**URL:** <https://discuss.elastic.co/t/index-output-setting/130905>\
**Category:** Logstash\
**Created:** [May 7, 2018, 8:51pm UTC](https://discuss.elastic.co/t/index-output-setting/130905 "2018-05-07T20:51:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElevenB2003](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@ElevenB2003](https://discuss.elastic.co/u/ElevenB2003)\
**Post date:** [May 7, 2018, 8:51pm UTC](https://discuss.elastic.co/t/index-output-setting/130905/1 "2018-05-07T20:51:45Z")

</div>

Hello,

I have multiple configuration files for logstash and each has their own input, filter, and output. However, I'm experiencing something strange: all data is flowing into all indexes even though I'm using the "index" output setting and specifying the data should be sent to its respective index.

Is this expected or am I missing something?

Example:  
Output code from file 1:

output {  
elasticsearch {  
hosts =\> "localhost:9200"  
user =\> "elastic"  
password =\> "mypassword"  
index =\> "index1-%{+YYYY.MM.dd}"  
}  
}

Output code from file 2:

output {  
elasticsearch {  
hosts =\> "localhost:9200"  
user =\> "elastic"  
password =\> "mypassword"  
index =\> "index2-%{+YYYY.MM.dd}"  
}  
}

All data is appearing in both indexes...

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:** [May 8, 2018, 6:04am UTC](https://discuss.elastic.co/t/index-output-setting/130905/2 "2018-05-08T06:04:25Z")

</div>

Logstash concatenates these files. All events from all inputs will go to all outputs unless you use conditionals. You can also consider the multi-pipeline feature in Logstash 6.

---

<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:** [June 5, 2018, 6:04am UTC](https://discuss.elastic.co/t/index-output-setting/130905/3 "2018-06-05T06:04:25Z")

</div>

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