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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...