繁体   English   中英

无法配置 mongodb 和 logstash

[英]cannot configure mongodb and logstash

嗨,我是新的 logstash 和 mongodb。 我不确定这是否是提问的正确地方,但我真的需要帮助。 我也在logstash-users google group 中发布了同样的问题,但我还没有收到任何答案。 此外,我已经浏览了 google 组的所有帖子,但似乎没有一个解决方案有效。

我需要使用 mongodb 进行输出,所以我运行了以下命令:

./plugin 安装贡献

之后我运行了这个命令

./logstash 代理 --config logstash-shipper.conf

我的 logstash-shipper.conf 是

输入 {

文件 {

 path => "/var/log/alternatives.log" type => "syslog"

}

}

输出 {
mongodb {

 codec => "plain" collection => "logstash" database => "mydb" generateId => true isodate => true uri => "mongodb://localhost:27017/" } }

我得到了错误

Using milestone 2 input plugin 'file'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.0/plugin-milestones {:level=>:warn}
+---------------------------------------------------------+
| An unexpected error occurred. This is probably a bug.   |
| You can find help with this problem in a few places:    |
|                                                         |
| * chat: #logstash IRC channel on freenode irc.          |
|     IRC via the web: http://goo.gl/TI4Ro                |
| * email: logstash-users@googlegroups.com                |
| * bug system: https://logstash.jira.com/                |
|                                                         |
+---------------------------------------------------------+
The error reported is: 
  Couldn't find any output plugin named 'mongodb'. Are you sure this is correct? Trying to load the mongodb output plugin resulted in this error: no such file to load -- logstash/outputs/mongodb

据我所知,1.4.2 发行版略有损坏。 发行版的版本名称是“1.4.2-modified”,但贡献版本仍然是“1.4.2”。

我的解决方法是找到 ./lib/logstash/version.rb 并更改

LOGSTASH_VERSION = "1.4.2-修改"

LOGSTASH_VERSION = "1.4.2"

这允许

./plugin 安装贡献

工作(即我的 mongodb 连接现在工作),到目前为止没有其他任何问题。 有趣的是,在 version.rb 文件中有一个注释说

# Note to authors: this should not include dashes because 'gem' barfs if
# you include a dash in the version string.

哎呀。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM