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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...