logstash-out-mongodb 设置generateId老是报异常,求指导

小努蛋 发布于 2016/09/02 14:12
阅读 455
收藏 0

大神们好,遇到非常痛苦的问题。现在用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}

加载中
0
小努蛋
小努蛋
设置generateId就报这个异常,请求怎么处理。
返回顶部
顶部