[英]connecting mongoDB with Logstash Elasticsearch
I need help in installing MongoDB input plugin in logstash and the config file to connect with MongoDB. 我需要在Logstash中安装MongoDB输入插件和配置文件以与MongoDB连接的帮助。 I am using ElasticSearch-Logstash in Windows Os. 我在Windows Os中使用ElasticSearch-Logstash。
I have the Logstash-input-MongoDB plugin zip file. 我有Logstash-input-MongoDB插件zip文件。 what are the steps for manual installation. 手动安装有哪些步骤。
First you should know that there is no official mongodb input plugin for logstash. 首先,您应该知道,logstash没有官方的mongodb输入插件。 Please take a look at logstash's official plugin list . 请查看logstash的官方插件列表 。
I don't know where you got your zip file but you should use logstash's built-in plugin manager to install new plugins. 我不知道您的zip文件在哪里,但是您应该使用logstash的内置插件管理器来安装新插件。 The manual installation is much more complex. 手动安装要复杂得多。 Use the following command to install a community based mongodb input plugin: 使用以下命令来安装基于社区的mongodb输入插件:
$LS_HOME/bin/plugin install logstash-input-mongodb
It will install this RubyGem for you. 它将为您安装此RubyGem 。 According to its documentation (which can be found on GitHub ) it could be used like this: 根据其文档(可以在GitHub上找到 ),可以这样使用:
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 . 但是,由于这是一个非官方的插件,您可能会遇到一些错误 。
The use of "LS_HOME/bin/plugin" is deprecated and will be removed in a feature release. 不建议使用“ LS_HOME / bin / plugin”,并将在功能发行版中将其删除。 Please use "LS_HOME/bin/logstash-plugin". 请使用“ LS_HOME / bin / logstash-plugin”。
You can install this plugin using command given below: 您可以使用以下命令安装此插件:
cd LS_HOME/bin/ && sudo ./logstash-plugin install logstash-input-mongodb
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.