# Mongodb Logstash Elasticsearch

**URL:** https://discuss.elastic.co/t/mongodb-logstash-elasticsearch/187429
**Category:** Logstash
**Created:** [June 25, 2019, 8:39pm UTC](https://discuss.elastic.co/t/mongodb-logstash-elasticsearch/187429 "2019-06-25T20:39:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kv3singh](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kv3singh](https://discuss.elastic.co/u/kv3singh)
#### Post date: [June 25, 2019, 8:39pm UTC](https://discuss.elastic.co/t/mongodb-logstash-elasticsearch/187429/1 "2019-06-25T20:39:29Z")

</div>

Hi,  
I am fetching data from mongodb as Input using Logstash and elasticsearch as output.  
Can anyone help me in getting data from two different collections of mongodb using logstash into two different index of elasticsearch i.e. one for each collection using single instance of logstash.

I am using mongodb input plugin for logstash.

Thanks

---

<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 23, 2019, 8:39pm UTC](https://discuss.elastic.co/t/mongodb-logstash-elasticsearch/187429/2 "2019-07-23T20:39:30Z")

</div>

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