Splunk Search

Why do the REST API and Splunk GUI give different results for the same query?

btoomey
New Member

When I run the query search index=* sourcetype="XXX" earliest=-7d@d latest=-6d@d | stats count via the REST API, I get a count of 2752. (Note: I'm using the Python requests library to submit the query.) However, when I run the exact same query via the Splunk GUI, I get a count of 197395.

I realize that my problem is similar to the one explored in this question: https://answers.splunk.com/answers/25431/inconsistency-between-splunk-api-vs-gui-search-results.html.... However, I use the | stats count and results endpoint approach suggested by that answer. Also, even if the count was also being capped at 100000 events as happens with the eventCount property, the count is still far below 100000. Thus, my problem must have a different cause.

Thanks!

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Infographic provides the TL;DR for the 2024 Splunk Career Impact Report

We’ve been buzzing with excitement about the recent validation of Splunk Education! The 2024 Splunk Career ...

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...