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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...