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!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...