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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...