Splunk Search

Search since beginning of yesterday

SplnkUse
Path Finder

Hello

If now, it is 30/12/2021 22:30, how can I search for timestamps from 29/12/2021 00:00:00 (i.e. beginning of 29/12/2021 or dynamically 'beginning of yesterday')?

I need this in a search code rather than the GUI presets etc.

Thanks!

Labels (1)
0 Karma

ashvinpandey
Contributor

@SplnkUse Please add the below earliest and lastest in your query after your index and sourcetype, example:

index=<<your_indexname>> sourcetype=<<your_sourcetypename>> earliest=-1d@d latest=now

Also if this reply helped you in solving your problem an up-vote would be appreciated.

 

 

richgalloway
SplunkTrust
SplunkTrust

Try earliest=-1d@d

See https://docs.splunk.com/Documentation/Splunk/8.2.4/SearchReference/SearchTimeModifiers for details.

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...