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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...