How to config Logstash input from MongoDB

Is this OK?
input {
mongodb {
database => "my_db"
uri => "mongodb://szxtsv12066mgd:27017"
codec => json

output {
elasticsearch {
hosts => ["",""]

What version of LS are you on?


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 - Errno::ECONNREFUSED: Connect
ion refused - Connection refused (
ERROR: Installation aborted, verification failed for logstash-input-mongodb

Looks like you cannot connect to install the plugin.
However there is no mongodb input plugin for 2.1.1 -

I try

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

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.