Getting Data In

All time (real-time) search through the API

zenmoto
Path Finder

I'm trying to do a real-time search using the REST API- I've got a bit of a delay indexing, and I want events as they are indexed, even if they are old. In the UI, I can specify an 'All-time (real-time)' search and get that behavior, but I can't figure out how to specify that behavior using the API. If I use earliest_time = 'rt' I seem to miss events, if I use a window like earliest_time = rt-1h I get a lot of events with preview=true and it appears they are duplicated. What is the proper earliest_time value to use for this type of search?

Tags (2)
0 Karma

zenmoto
Path Finder

I think I figured this out myself- though I'd dug into the _internal logs, inspected searches, combed through documentation and been unable to find it I just happened to be looking at my URL bar as I did an 'All time (real-time)' search in the GUI and saw the time parameters- '&earliest=rt&latest=rt'. So it looks like having both earliest_time and latest_time set to 'rt' seems to be the answer- I just need to chase down why it is working in the GUI but isn't working via the API.

0 Karma
Get Updates on the Splunk Community!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...