Splunk Search

How do I find out Splunk API query row count?


I am using Python API call to get Splunk data. I was running to a limit where I was hitting a limit of 50k. I saw this post that talked about making multiple calls to iterate through 50k records at a time. My question is how do I know when to stop? Is there a way I get to figure out exactly how many records it has and then I can make the right number of loops?


Tags (1)
0 Karma


You can use the stats or timechart commands

|timechart count as nbevent span=60m by _time | where nbevent>50000

Decrease span=60m until you drop under 50000

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...