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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...