Splunk Search

Automated daily lookups

MayDayOne
Explorer

index="URL" NOT [inputlookup A_list_Jan1.csv | fields gtld]
| inputlookup A_listJan1.csv append=true
| dedup gtld
| table gtld
| outputlookup [ | stats count | eval filename=strftime(now(), "B_list%b%d.csv") | return $filename]

QUESTION:
I want to run this search daily. Is there anyway I can automate this search so that "B_list%b%d.csv" gets inserted as the first "inputlookup". This would result in the next days outputlookup as "C_list%b%d.csv".

REASON:
I see 100's of new gtld's on daily basis and I'm making a list of "total gtld's seen".

SECONDARY GOAL:
Create a second daily list of only the new gtld's seen for that day.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You could make one lookup and include the timestamp of when that ID has been first seen. Should kill both birds with one stone, an overall list and - by filtering - a list per day.

0 Karma

MayDayOne
Explorer

EDIT:
The top two .csv files are the same.

index="URL" NOT [inputlookup A_listJan1.csv | fields gtld]
| inputlookup A_listJan1.csv append=true

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...