this my code
input {
jdbc {
jdbc_connection_string => "jdbc:mysql://fgh:3306/fgh?useSSL=false"
# The user we wish to execute our statement as
jdbc_user => "fghfgh"
jdbc_password => "fghfghhfgfgh"
# The path to our downloaded jdbc driver
jdbc_driver_library => "/dfghmysql-connector-java-8.0.18.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
# our query
statement => "SELECT * FROM fdh"
# schedule => "*/5 * * * * *"
clean_run => true
}
}
output {
# stdout {
# codec => json_lines
# }
mongodb {
id => "dddddddd"
collection => "dfd"
database => "springboottest"
uri => "mongodb://localhost:27017"
codec => "json"
# generateId => true
isodate => true
}
}
the version i using
- logstash-6.2.2
- logstash-output-mongodb (3.1.6)
- logstash-input-jdbc (4.3.3)
gettiing error
[2019-11-20T13:34:48,843][WARN ][logstash.outputs.mongodb ] Failed to send event to MongoDB, retrying in 3 seconds {:event=>#LogStash::Event:0x2367ca72, :exception=>#<ArgumentError: wrong number of arguments (2 for 1)>}
[2019-11-20T13:34:49,297][WARN ][logstash.shutdownwatcher ] {"inflight_count"=>531, "stalling_thread_info"=>{"other"=>[{"thread_id"=>34, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in pop'"}, {"thread_id"=>35, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in
pop'"}, {"thread_id"=>36, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in pop'"}, {"thread_id"=>37, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in
pop'"}, {"thread_id"=>38, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in pop'"}, {"thread_id"=>39, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in
pop'"}, {"thread_id"=>40, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in pop'"}, {"thread_id"=>41, "name"=>nil, "current_call"=>"[...]/vendor/bundle/jruby/2.3.0/gems/logstash-output-mongodb-3.1.6/lib/logstash/outputs/mongodb.rb:123:in
sleep'"}]}}