Splunk Search

how to search from yesterday at certain time until today

cheyenne15
New Member

I am looking to create a search looks at after hour activities. How would you search for events from yesterday beginning after 5pm until 7am.

earliest=-1d@d and latest=@d

Tags (1)
0 Karma
1 Solution

vasanthmss
Motivator

try something like this,

earliest= "-1d@d+17h@h" latest="@d+7h@h"
V

View solution in original post

acharlieh
Influencer

When specifying relative time modifiers in your search you can chain together modifiers...

So earliest=@d-7h latest=@d+7h would be 5p (snap to midnight then subtract 7 hours) to 7a (snap to midnight and add 7 hours)
Alternatively earliest=-d@d+17h snap to midnight yesterday, and add 17hours (5p)

cheyenne15
New Member

Thanks! The response in the forum is amazing!

0 Karma

vasanthmss
Motivator

try something like this,

earliest= "-1d@d+17h@h" latest="@d+7h@h"
V

cheyenne15
New Member

It works perfectly! Thanks so much.

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