All Apps and Add-ons

Splunk DB Connect 2: What is the serviceClass for MongoDB Java driver?

Path Finder

I'm trying to use the Unity MongoDB jdbc driver with Splunk DC Connect 2.2.0.

serviceClass is a required configuration option in local/db_connection_types.conf, but I don't know what to enter for this.

0 Karma

Splunk Employee
Splunk Employee

Overall this link should enable you to connect to MongoDB using DB Connect V2: http://www.unityjdbc.com/mongojdbc/setup/mongodb_jdbc_splunk_dbconnect_v2.pdf

However, in my case the instance of MongoDB does not have any authentication. So I used a slightly modified version of the jdbcUrlFormat. Notice the difference between jdbc:mongo:// in the above URL link vs jdbc:mongodb:// I used to bypass the authentication

[mongo2]
displayName = MongoDB2
serviceClass = com.splunk.dbx2.DefaultDBX2JDBC
jdbcUrlFormat = jdbc:mongodb://host:port/database
jdbcDriverClass = mongodb.jdbc.MongoDriver
port = 27017
0 Karma

Splunk Employee
Splunk Employee

serviceClass is a DB Connect construct -- try com.splunk.dbx2.DefaultDBX2JDBC and see if that works?

0 Karma