Getting Data In

How to get Lookups into an Index?

bofasplunkguy
Explorer

I would like to get my lookups (both CSV and KV Store) into an index, perhaps maybe once a day. This way I can view changes over view and would have an easy backup, not to mention it would be easier to search without needing to join on the inputlookup command.

Can anyone help me with an easy way to index my lookup data?

0 Karma

gcusello
Esteemed Legend

Hi bofasplunkguy,
at first put these values in a summary index so you don't pay license!
You can do this with the collect command, e.g.:

| inputlookup my_lookup
| fields field1 field2 field3
| collect index=my_summary

Then you can search on the summary index.

Bye.
Giuseppe

dmarling
Builder

You can use a collect statement to write the data from your lookup/kv store to an index: https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Collect

Example:

| inputlookup mylookup
| collect index=myindex source=mylookupdaily

Then you schedule that to run daily as an alert or report. This won't count towards your license usage unless you set the sourcetype to anything other than the default "stash" on the collect statement.

If this comment/answer was helpful, please up vote it. Thank you.
Get Updates on the Splunk Community!

Splunk Security Content for Threat Detection & Response, Q1 Roundup

Join Principal Threat Researcher, Michael Haag, as he walks through:An introduction to the Splunk Threat ...

Splunk Life | Happy Pride Month!

Happy Pride Month, Splunk Community! 🌈 In the United States, as well as many countries around the ...

SplunkTrust | Where Are They Now - Michael Uschmann

The Background Five years ago, Splunk published several videos showcasing members of the SplunkTrust to share ...