Hello!
I need read info from MongoDB
I use JDBC in Logstash input
jdbc {
jdbc_driver_library => "/usr/share/logstash/logstash-core/lib/jars/mongojdbc4.8.jar"
jdbc_driver_class => "Java::com.dbschema.MongoJdbcDriver"
jdbc_connection_string => "jdbc:mongodb://user:password@localhost:27017/testdb"
jdbc_user => "user"
jdbc_password => "password"
schedule => "*/30 * * * * *"
statement => "db.documents_demo.find({});"
}
but it doesn't work
[2022-12-19T17:41:44,688][ERROR][logstash.javapipeline ][jdbc-mongodb][8ccae34ded8cca6aaeb76f587dab9816e9c8c25879afa66f5522aac447b38cde] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:jdbc-bugbounty-mongodb
Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"user", schedule=>"*/30 * * * * *", jdbc_password=><password>, statement=>"db.documents_demo.find({});", jdbc_driver_library=>"/usr/share/logstash/logstash-core/lib/jars/mongojdbc4.8.jar", jdbc_connection_string=>"jdbc:mongodb://user:password@localhost:27017/testdb", id=>"8ccae34ded8cca6aaeb76f587dab9816e9c8c25879afa66f5522aac447b38cde", jdbc_driver_class=>"Java::com.dbschema.MongoJdbcDriver", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_191dbbdb-0b48-4b73-a43b-ae1805195832", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_paging_mode=>"auto", jdbc_page_size=>100000, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, plugin_timezone=>"utc", last_run_metadata_path=>"/usr/share/logstash/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true, use_prepared_statements=>false>
What does I need change for good working jdbc?