# How to config Logstash input from MongoDB

**URL:** <https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178>\
**Category:** Logstash\
**Created:** [January 14, 2016, 2:26am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178 "2016-01-14T02:26:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tctr715](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@tctr715](https://discuss.elastic.co/u/tctr715)\
**Post date:** [January 14, 2016, 2:26am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178/1 "2016-01-14T02:26:08Z")

</div>

**Is this OK？**  
input {  
mongodb {  
database =\> "my\_db"  
uri =\> "mongodb://szxtsv12066mgd:27017"  
codec =\> json  
}  
}

output {  
elasticsearch {  
hosts =\> ["127.0.0.1:9201","127.0.0.1:9202"]  
}  
}

---

<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:** [January 14, 2016, 6:17am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178/2 "2016-01-14T06:17:22Z")

</div>

What version of LS are you on?

---

<div class="post-metadata">

**Author:** ![tctr715](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@tctr715](https://discuss.elastic.co/u/tctr715)\
**Post date:** [January 14, 2016, 7:01am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178/3 "2016-01-14T07:01:27Z")

</div>

logstash-2.1.1

---

<div class="post-metadata">

**Author:** ![tctr715](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@tctr715](https://discuss.elastic.co/u/tctr715)\
**Post date:** [January 14, 2016, 7:11am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178/4 "2016-01-14T07:11:36Z")

</div>

**it confirm ：plugin install logstash-input-mongodb**  
**but failure：**  
D:\Program Files\logstash-2.1.1\bin\>plugin install logstash-input-mongodb  
io/console not supported; tty will not be manipulated  
Validating logstash-input-mongodb  
Unable to download data from [https://rubygems.org](https://rubygems.org) - Errno::ECONNREFUSED: Connect  
ion refused - Connection refused ([https://api.rubygems.org/latest\_specs.4.8.gz](https://api.rubygems.org/latest_specs.4.8.gz))  
ERROR: Installation aborted, verification failed for logstash-input-mongodb

---

<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:** [January 14, 2016, 7:20am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178/5 "2016-01-14T07:20:35Z")

</div>

Looks like you cannot connect to install the plugin.  
However there is no mongodb input plugin for 2.1.1 - [https://www.elastic.co/guide/en/logstash/2.1/input-plugins.html](https://www.elastic.co/guide/en/logstash/2.1/input-plugins.html)

---

<div class="post-metadata">

**Author:** ![tctr715](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@tctr715](https://discuss.elastic.co/u/tctr715)\
**Post date:** [January 14, 2016, 7:38am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178/6 "2016-01-14T07:38:10Z")

</div>

I try  
logstash-2.1.1  
logstash-2.1.0

use plugin list comand : therer is no logstash-input-mongodb  
how can I do ?

---

<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:** [January 14, 2016, 7:42am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178/7 "2016-01-14T07:42:14Z")

</div>

Well from what I can see there was no input like that that we provided going back to 1.5.  
So you may have to find a community one that does it.

---

<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:15am UTC](https://discuss.elastic.co/t/how-to-config-logstash-input-from-mongodb/39178/8 "2017-07-06T05:15:44Z")

</div>


