Splunk Search

Why is my search not returning results for the latest events per index?

johannrenck
Engager

Hi,

I have 3 indexes that get updated with the same date. They are all a snapshot of pre production config data that gets updated twice per day. Running the following gives me the last date:

index=*  Date < a | stats max(Date)

But if I try to run the following it doesn't return anything:

index=* [search index=*  Date < a | stats max(Date)] | stats count by index,Date 

What Am I missing?

The < a is because some data in the Date field gets wrongly created using the column header "Date"

Thanks,

Johann

Tags (4)
0 Karma
1 Solution

johannrenck
Engager

Ok, found the answer

index=* [search index=*  Date < a | stats max(Date) as Date] | stats count by index,Date

As Date solved the issue...

View solution in original post

0 Karma

johannrenck
Engager

Ok, found the answer

index=* [search index=*  Date < a | stats max(Date) as Date] | stats count by index,Date

As Date solved the issue...

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...