Splunk Search

Is it possible to create a lookup that pulls from in a query?

jeffh2022
New Member

I've got a query I want to run on a daily basis, and write the results to a lookup (# of results once per day)

then, I want to be able to query that lookup to pull the last 7 days counts.

Is this possible? Is there a better way?

I have a lookup file of IDS exclusions I am constantly updating and I want to be able to see how many results from the search I had each day; if I run the search at the end of the 7 days it wont be accurate because it would be against the lookup after 7 days of updates, so if I had 20 results on Monday and put something in the lookup that excluded those 20, I wouldn't have visibility when I ran it the next day since the lookup would exclude those 20 results.

I was thinking if I could store the count somewhere each day and query that later, I wouldn't need to run anything against the exclusions lookup, I could just pull the historical counts I wrote.

 

Sorry if I am overcomplicating this, I'm new to Splunk so if there is a better way to do it please let me know!

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Can you include the date that the counts apply to in the lookup file with the counts?

0 Karma

jeffh2022
New Member

I'm not opposed to it, I'd imagine I need something to tell the 2nd query what results to pull, like when there are 30 days worth and I only want the last 7, I just dont know what that would look like.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...