Getting Data In

DBConnect 3.2.0 integration with MongoDB

Cbr1sg
Path Finder

Hi all,

I have problem getting Splunk to connect to MongoDB. Below are what i have done so far:

1. Download the driver from https://raw.githubusercontent.com/michaelloliveira/traccar-mongodb/master/lib/mongodb_unityjdbc_full... and copy it to drivers folder of dbconnect app

2. copy db_connection_types.conf from default to local folder, and add following line

[mongo]
displayName= MongoDB
jdbcDriverClass = mongodb.jdbc.MongoDriver
serviceClass = com.splunk.dbx2.DefaultDBX2JDBC
jdbcUrlFormat = jdbc:mongo://<host>:<port>/<database>
#jdbcUrlSSLFormat = jdbc:mongo://<host>:<port>/<database>
useConnectionPool = false
port = 27017
testQuery = SELECT 1

[mongo2]
displayName= MongoDB2
serviceClass = com.splunk.dbx2.DefaultDBX2JDBC
jdbcUrlFormat = jdbc:mongodb://<host>:<port>/<database>
#jdbcUrlSSLFormat = jdbc:mongodb://<host>:<port>/<database>
jdbcDriverClass = mongodb.jdbc.MongoDriver
port = 27017

3. Create identity for the connection. This account has readWrite permission on the database and tested working.

4. Restart Splunk. I can see driver can be detected for both MongoDB connection types

5. Create connection that use either MongoDB or MongoDB2. Both failed

Error for MongoDB:

not authorized for query on Test._schema

Error for MongoDB2:

No suitable driver found for jdbc:mongodb://si0vmc3134.de.bosch.com:30000/Test

 

Anyone know what's wrong here? Thanks

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...