Splunk Search

How do I find out Splunk API query row count?

Splunkster45
Communicator

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?

Thanks

Tags (1)
0 Karma

valiquet
Contributor

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!

.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 ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...