All Apps and Add-ons

Configure DB Connect App Programatically

rfitch
Path Finder

I'd like to add and remove DB Connect configurations programatically. Has anyone tried this? I'm guessing I can just add / remove entries to the db_connections.conf, inputs.conf, and identities.conf.

For the identities.conf, if I put the password in there plain text, will Splunk hash it for me, or is there a way I can do that ahead of time?

0 Karma

jcoates_splunk
Splunk Employee
Splunk Employee

I'd advise using DB Connect 3 if you're going to use automatic configuration. The different types of inputs are separated into different files, rising column checkpoints are separated into a different location, and SQL parsing is strictly WYSIWYG. One gotcha in 3.0.0 is that you've got to "seed" the rising column file in your script.

0 Karma

rfitch
Path Finder

Found the answer, credentials can be added using curl.

https://docs.splunk.com/Documentation/DBX/2.4.0/DeployDBX/javaspec

0 Karma

sloshburch
Splunk Employee
Splunk Employee

Alternatively, I wonder if there's a REST api that you can use for generating the new connection. That's because typically conf file updates require a restart of splunkd while REST calls often do not.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...