All Apps and Add-ons

What connection type should be used for mongodb to SPLUNK db connect

vrmandadi
Builder

Currently we have Splunk db connect app 3.1.4 version and I want to connect to MongoDB .In the DB CONNECT under the connections what connection type should be selected for MongoDB.I dont see anything for MongoDB.What would we the work around to connect to it.

Thanks in Advance

0 Karma

umlawren
Explorer

The JAR file should be in the directory $SPLUNK_HOME/etc/apps/splunk_app_db_connect/drivers

You should modify the file db_connection_types.conf file in $SPLUNK_HOME/etc/apps/splunk_app_db_connect/default to have the details posted by vrmandadi above:

[mongo]
displayName = MongoDB
jdbcDriverClass = mongodb.jdbc.MongoDriver
serviceClass = com.splunk.dbx2.DefaultDBX2JDBC
jdbcUrlFormat = jdbc:mongo://<host>:<port>/<database>

Full installation instructions for MongoDB JDBC driver with Splunk DBConnect version 3 are available.

richgalloway
SplunkTrust
SplunkTrust

Have you installed a JDBC driver for MongoDB on your DB Connect server?

---
If this reply helps you, Karma would be appreciated.
0 Karma

vrmandadi
Builder

No I have not .So what is the correct JDBC driver that needs to be installed? .This should be under app/drivers folder right?

0 Karma

nickhills
Ultra Champion
0 Karma

vrmandadi
Builder

Hello @nickhillscpl thank you for your reply .I did download the jar file but where should the stanza be placed /in which location it should be placed

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

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...