All Apps and Add-ons

Can we Create and manage database connections via CLI for Splunk DB Connect so that the entire process can be automated?

saranya_fmr
Communicator

Is there a way to "Create and manage database connections" via CLI so that the entire process can be automated rather than manually creating DB Connection via the UI evrytime??

Where will the password be stored and how do I encrypt it ?

OR

Is there any other way to automate creating a DB Connection??

sloshburch
Splunk Employee
Splunk Employee

Typically, automation would be tackled through either a REST API or the conf files.

  • The REST API is the safest approach because it notifies splunkd of changes (which typically circumvents restarts) and can have some degree of validation (and password hashing). Unfortunately, I don't see anything in the DBConnect docs for the REST API. I highly encourage you to open a P4 request with support (which is an Enhancement Request) so the product team is aware of your desire to do this.

  • The conf files approach likely requires a restart to take effect and you'll want to check the splunkd log or the startup system out to look for any validation errors. You might be able to also use btool to check for such validation errors. Passwords may get hashed at restart, just like they would for other password attributes in conf files. The configuration files are documented here: http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Configurationfilereference

0 Karma

saranya_fmr
Communicator

Hi @ SloshBurch ,

1)I tried creating a connection via CLI by updating identities.conf and db_connections.conf and it didn't seem to work.
I would like know if DB Connection creation via CLI is possible or not at all..??

2) Also I believe Splunk doesnt provide automation via REST API for db connections... I didnt find them in splunk docs

0 Karma

sloshburch
Splunk Employee
Splunk Employee

I've notified your account team that you need help with this. It might require some webex sessions that they are best positioned for.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...