logstash-out-mongodb 设置generateId老是报异常,求指导
大神们好,遇到非常痛苦的问题。现在用logstash-out-mongodb插件,设置generateId=>true,为是报异常。请求帮忙解决下。谢谢。
配置文件:
input {
stdin{}
}
output{
mongodb {
collection => "std"
database => "fragment"
generateId => true
uri => "mongodb://192.168.199.7:27017"
}
}
异常:
Failed to send event to MongoDB {:event=>#<LogStash::Event:0x2ef73b32 @metadata={}, @accessors=#<LogStash::Util::Accessors:0x694f67b4 @store={"message"=>"hello", "@version"=>"1", "@timestamp"=>"2016-09-02T05:33:49.575Z", "host"=>"mini03"}, @lut={"host"=>[{"message"=>"hello", "@version"=>"1", "@timestamp"=>"2016-09-02T05:33:49.575Z", "host"=>"mini03"}, "host"], "@timestamp"=>[{"message"=>"hello", "@version"=>"1", "@timestamp"=>"2016-09-02T05:33:49.575Z", "host"=>"mini03"}, "@timestamp"]}>, @data={"message"=>"hello", "@version"=>"1", "@timestamp"=>"2016-09-02T05:33:49.575Z", "host"=>"mini03"}, @metadata_accessors=#<LogStash::Util::Accessors:0x1f036be0 @store={}, @lut={}>, @cancelled=false>, :exception=>#<ArgumentError: wrong number of arguments calling `initialize` (2 for 0)>, :backtrace=>["/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-output-mongodb-2.0.5/lib/logstash/outputs/mongodb.rb:54:in `receive'", "/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/outputs/base.rb:109:in `multi_receive'", "org/jruby/RubyArray.java:1613:in `each'", "/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/outputs/base.rb:109:in `multi_receive'", "/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/output_delegator.rb:130:in `worker_multi_receive'", "/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/output_delegator.rb:114:in `multi_receive'", "/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:301:in `output_batch'", "org/jruby/RubyHash.java:1342:in `each'", "/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:301:in `output_batch'", "/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:232:in `worker_loop'", "/export/servers/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:201:in `start_workers'"], :level=>:warn}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
设置generateId就报这个异常,请求怎么处理。