Splunk Search

Delete old data from lookupfile

Ravan
Path Finder

Hi,

I have a lookup file which will get update daily(from a scheduled search ), I need keep only last 45 days data in it, means data which is added 45 days back needs to be deleted.(we have _time field in lookup file)

Please let me know if there is any other way to store the data(which will update daily ) with out using lookup file.

Tags (1)

dwaddle
SplunkTrust
SplunkTrust

This (should be) fairly trivial as part of your scheduled search that creates your lookup. I assume that your lookup is created roughly as follows:

some_search_terms | inputlookup append=true lookup.csv | 
some_other_stuff | outputlookup lookup.csv

Following this paradigm, you can insert something like this before the outputlookup:

| where _time >= now() - (86400 * 45)
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...