# Logstash 2 different input files into 2 different indices

**URL:** https://discuss.elastic.co/t/logstash-2-different-input-files-into-2-different-indices/90956
**Category:** Logstash
**Created:** [June 27, 2017, 12:29pm UTC](https://discuss.elastic.co/t/logstash-2-different-input-files-into-2-different-indices/90956 "2017-06-27T12:29:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jalpesh1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@Jalpesh1](https://discuss.elastic.co/u/Jalpesh1)
#### Post date: [June 27, 2017, 12:29pm UTC](https://discuss.elastic.co/t/logstash-2-different-input-files-into-2-different-indices/90956/1 "2017-06-27T12:29:56Z")

</div>

HI Team,

We have 2 different input files to Logstash & we want feed this data to 2 different indices on same instance.

Please suggest.

Thanks & Regards,  
Jalpesh

---

<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 27, 2017, 2:27pm UTC](https://discuss.elastic.co/t/logstash-2-different-input-files-into-2-different-indices/90956/2 "2017-06-27T14:27:33Z")

</div>

Use conditionals, see [https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html).

---

<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 25, 2017, 2:28pm UTC](https://discuss.elastic.co/t/logstash-2-different-input-files-into-2-different-indices/90956/3 "2017-07-25T14:28:13Z")

</div>

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