I need help in installing MongoDB input plugin in logstash and the config file to connect with MongoDB. I am using ElasticSearch-Logstash in Windows Os.
I have the Logstash-input-MongoDB plugin zip file. what are the steps for manual installation.
First you should know that there is no official mongodb input plugin for logstash. Please take a look at logstash's official plugin list.
I don't know where you got your zip file but you should use logstash's built-in plugin manager to install new plugins. The manual installation is much more complex. Use the following command to install a community based mongodb input plugin:
$LS_HOME/bin/plugin install logstash-input-mongodb
It will install this RubyGem for you. According to its documentation (which can be found on GitHub) it could be used like this:
input {
mongodb {
uri => 'mongodb://10.0.0.30/my-logs?ssl=true'
path => '/opt/logstash-mongodb/logstash_sqlite.db'
collection => 'events_'
unpack_mongo_id => true
batch_size => 5000
}
}
However, since this is a non-official plugin you might experience some bugs.
logstash-output-mongodb. I've posted an answer to this issue here: stackoverflow.com/questions/31652436/…