Splunk Search

How can I associate and display uncollected user data from a DB2 server with user data collected and parsed in Splunk??

jkoepsell
Engager

Hello,

When performing a search, can Splunk perform a DB2 database lookup of uncollected user data, associate it with logged user data and display both logged and unlogged user data in the search results? Could somebody please explain how I go about doing this? For example, we have Splunk currently set to log a subset of user information data: UserName and ContractNumber. When performing a search in Splunk, we would like the results to associate additional user data contained in our DB2 server (e.g., FirstName & LastName), with the data collected by Splunk and display all data in the search results (e.g., UserName, ContractNumber, FirstName & LastName).

Can anybody point me in the direction of any tutorials, sample queries / programs or sagely Splunk gurus out there that can help figure this out?

tgow
Splunk Employee
Splunk Employee

You can use the lookup command in your search string. Splunk can execute the SQL to pull the data out of your DB2 database but it is recommended that you do this in a separate script outside of Splunk. Run the SQL script against the DB2 DB and put the data into a .csv file and Splunk can read it via the lookup commdand.

Here is a link to examples.

http://www.splunk.com/base/Documentation/4.1.5/Knowledge/Addfieldsfromexternaldatasources#Set_up_a_f...

Hope this helps.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...