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

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!

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...

New Dates, New City: Save the Date for .conf25!

Wake up, babe! New .conf25 dates AND location just dropped!! That's right, this year, .conf25 is taking place ...

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...