All Apps and Add-ons

Splunk DB Connect 2: Why am I getting "Validation error: jdbcUrlFormat is a mandatory parameter for the database connection."?

ashish_ray
New Member

I am trying to integrate Splunk DB Connect 2 (Latest), after putting the following settings in “db_connection_types.conf” local file

[mongo]
displayName = MongoDB
jdbcDriverClass = mongodb.jdbc.MongoDriver
connectionUrlFormat = jdbc:mongo://{0}:{1}/{2}
testQuery = SELECT 1

[unity]
displayName = Unity
jdbcDriverClass = unity.jdbc.UnityDriver
connectionUrlFormat = jdbc:unity://{0}
testQuery = SELECT 1 

I get this message on the connection UI page while validating MongoDB JDBC driver (third party):

jdbcUrlFormat is a mandatory parameter for the database connection.

0 Karma

egcthistle
Explorer

There were some changes to the format of the db_connection_types.conf.

Specfically 'connectionUrlFormat' changed to 'jbdcUrlFormat' and 'defaultport' to 'port'

for your case:
connectionUrlFormat = jdbc:mongo://< host>:< port>;databaseName=< database >

General:
jdbcUrlFormat = jdbc:whateverDB://< host>:< port>;databaseName=< database>

jdbcUrlSSLFormat = jdbc:whateverDB://< host>:< port>;databaseName=< database>whatever SSL conn string you use
port = 5432
serviceClass = com.splunk.dbx2.MSSQLJDBC

You also might need 'serviceClass', it was needed for MS SQL, not sure about Mongo/others.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...