Splunk Search

Importing External Lookup Table from PostgresDB

balbano
Contributor

Hi,

I would like to import an external lookup table from a postgres DB.

What would be the best way to do this?

Thanks.

Brian

Tags (1)
0 Karma

dwaddle
SplunkTrust
SplunkTrust

"Best" is subjective, depending on your situation. You have two clear-cut options:

  1. Periodically run a query against the DB, exporting to a CSV file which Splunk then refers to.
  2. Do a scripted lookup which queries the DB each time the lookup is used

There are good reasons for both. Obviously, #1 is much, much simpler but has a lower update frequency. #2 is much more complicated, because you have to write code to make it work. But, #2 has the advantage of there being effectively no delay between updating the database and seeing the changes in Splunk. Your "business" requirements here are likely to influence your decision one way or the other.

The high-level of each, with an example scripted lookup, is in the docs at http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Addfieldsfromexternaldatasources

0 Karma

dwaddle
SplunkTrust
SplunkTrust

Do you have an update?

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 ...