Splunk Search

Time range not substituted by search

coreyCLI
Communicator

We have a SHC at version 8.1.3.  When we try to use "earliest" and "latest" in search we get results based on the earliest and latest however, its search events based on the time picker.  IE - If I create a search "index=main earliest=-15m latest=now" and the time picker is set to "24hours", the search will search all the events from the past 24 hours yet only display the results for the last 15 minutes.  If I test this same search outside of our SHC, on a standalone instance and use the "-15m" in search I get back the last minutes of events however I am ONLY search the last 15 minutes of events.  The search does not care about what is selected in the time picker.  As well, in the job inspector I see the "Your time range was substituted based on your search string" message as I would expect.  In the SHC cluster, I do not see this message.  

To add to the weirdness.  If I include a sourcetype in my search "index=main  sourcetype=stuff earliest=-15m latest=now" It works as expected and I see the message about substituting the timerage in the job inspector.  However, If I include more then one sourcetype, then it does NOT substitute the timerange.

0 Karma
1 Solution

coreyCLI
Communicator

For anyone interested.  I found an alias someone create using _time.  "FIELDALIAS-ts = ts as _time".  Once removed, all was working as it should.

View solution in original post

coreyCLI
Communicator

For anyone interested.  I found an alias someone create using _time.  "FIELDALIAS-ts = ts as _time".  Once removed, all was working as it should.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...