How to config Logstash input from MongoDB

(tongwencong) #1

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

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

(Mark Walkom) #2

What version of LS are you on?

(tongwencong) #3


(tongwencong) #4

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

(Mark Walkom) #5

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

(tongwencong) #6

I try

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

(Mark Walkom) #7

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.

(system) #8