Logstash, Mongodb and JDBC

Hi,

I have a problem configuring logstash. I want to be able to put in input jdbc for mongodb.
My config :
input{
jdbc{
jdbc_driver_library => "mongo-java-driver-3.2.2.jar"
jdbc_driver_class => "com.mongodb.MongoClient"
jdbc_connection_string => "jdbc:mongodb://localhost:27017"
jdbc_user => ""
}
}
output{
stdout{

}

}

The problem is :
:error=>"Java::JavaSql::SQLException: No suitable driver found for jdbc:mongodb://localhost:27017/"}

HI Adri:

Could you try using jdbc_driver_class => "Java::com.mongodb.MongoClient" ?
Regards

Yes, it's the same answer.

Hi again:

Is this driver the one from Unity?. Case it is Unity doc says that driver class is mongodb.jdbc.MongoDriver (note there is not com. prefix)

http://www.unityjdbc.com/support/doc/full/unityjdbcdoc.html#d6e475

"mongo-java-driver-3.2.2.jar" is the name of the official mongodb java library. This library does not implement JDBC, so it will not work. You need to look for JDBC driver.

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