Splunk Search

Can you remove multiple entries from a lookup table using a search?

mark_cet
Path Finder

Hi,

I have a lookup table that contains a list of sessions with permitted time frames (start day & time / end day & time). I am looking for a way to run a scheduled search to remove any expired entries from the lookup table (e.g. sessions with end days / times that have passed).

Can multiple entries be removed from a lookup table via a search? I know I can append to a lookup table but not sure about deletion.

 

Thanks!

Labels (1)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust

Hi

basically you create a scheduled search which will do it. Here is one example from community

https://community.splunk.com/t5/Splunk-Search/Updating-fields-in-a-lookup-through-a-scheduled-search...

  1. read old with inputlookup
  2. append it to your normal seach
  3. filter out unwanted entries
  4. store it back to lookup file with outputlookup
    1. Be sure that in problem situations you don't get empty file!

r. Ismo

View solution in original post

isoutamo
SplunkTrust
SplunkTrust

Hi

basically you create a scheduled search which will do it. Here is one example from community

https://community.splunk.com/t5/Splunk-Search/Updating-fields-in-a-lookup-through-a-scheduled-search...

  1. read old with inputlookup
  2. append it to your normal seach
  3. filter out unwanted entries
  4. store it back to lookup file with outputlookup
    1. Be sure that in problem situations you don't get empty file!

r. Ismo

mark_cet
Path Finder

Thank you very much for this isoutamo! I will give it a try.

 

 

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