How to config Logstash input from MongoDB

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"]
}
}

What version of LS are you on?

logstash-2.1.1

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 - Errno::ECONNREFUSED: Connect
ion refused - Connection refused (https://api.rubygems.org/latest_specs.4.8.gz)
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 - https://www.elastic.co/guide/en/logstash/2.1/input-plugins.html

I try
logstash-2.1.1
logstash-2.1.0

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.