Monitoring Splunk

Error with earliest and latest keywords

krish1733
Engager

I'm getting an error when I input earliest and latest keywords with the search query. I have set the time picker corresponding to the values used in the query.  It's showing 'Unknown search command 'earliest'' when trying to use those commands. I'm using splunk Enterprise version.

 

This is my query:

index=sample ServiceName="cet.prd.*" |  earliest=-3d latest=now()

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

earliest and latest are search terms, not commands, remove the pipe '|' which separates command in the search.

0 Karma

inventsekar
SplunkTrust
SplunkTrust

my apologies,  i read the 3 lines and missed the remaining..

Please try this... 

 

 

index=sample ServiceName="cet.prd.*"  earliest=-3d latest=now()

 

 

let us know what happens, thanks.  

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

krish1733
Engager

@inventsekar Please see my post. I had already added the query there.

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi @krish1733 
Pls check the Splunk Documentation for this topic:

https://docs.splunk.com/Documentation/Splunk/9.1.1/Search/Specifytimemodifiersinyoursearch

Splunk provides many options to specify these times.. for example, you can relatively calculate these times..  you can use a subsearch for calculating these times and pass it to main search. let us know more info about your requirements, so we can suggest you best ideas/solutions. 

As you are a new member, i would like to suggest you.. the karma points / upvotes are appreciated. if any post solves your question, please "accept that as the solution".. so the question will move out of unanswered queue, also it will help those who help you, thanks. 

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi @krish1733 .. pls update us your current Splunk Search query, how the earliest and latest you are calculating.. etc

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...