Logstash: jdbc input plugin with MongoDb

I'm trying to configure a pipeline between MongoDb and Elasticsearch using logstash and the jdbc input plugin.

I tried to use Unity Mongo Jdbc driver, and dbschema's driver but nothing works, and I got the error:

Sequel::DatabaseConnectionError
2022     Java::JavaSql::SQLException: No suitable driver found for 
jdbc:mongodb://localhost:27017/database
2022       
java.sql.DriverManager.getConnection(java/sql/DriverManager.java:689)
2022       
java.sql.DriverManager.getConnection(java/sql/DriverManager.java:270)
2022       java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
2022       
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling 
(org/jruby/javasupport/JavaMethod.java:423)

My configuration file is

input {
  jdbc {
    jdbc_driver_library => 
      "C:\Users\user\Desktop\mongojdbc1.2.jar, 
       C:\Users\user\Desktop\mongo- 
    java-driver-3.6.3.jar"
    jdbc_driver_class => "com.dbschema.MongoJdbcDriver"
    jdbc_connection_string => "jdbc:mongodb://localhost:27017/database"
    jdbc_user => "admin"
    schedule => "*/1 * * * *"
    statement => "SELECT * FROM dossier"
   }
}

output {
    stdout { codec => rubydebug }
}

Btw, I tried also with the Unity full Driver, and with combining both drivers above, but with no luck.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.