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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...