All Apps and Add-ons

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

richarddicaire
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

rdagan_splunk
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

jcoates_splunk
Splunk Employee
Splunk Employee

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

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...