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!

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 ...