Splunk Dev

Splunk SDK search results smaller than GUI search

mohan94
New Member

Hi,

I am using the python SDK to make the following query

search sourcetype=WinEventLog:Security earliest=<epoch_time_1> latest=<epoch_time_2>

The difference between the two epoch times is 30 seconds. If I cut and past the query into Splunk GUI, I get slightly larger set of results. I use the same account for making the query in both cases. Depending on the source e.g., the more busier the source, I get a big difference. I see anywhere from a difference of 10 to 2000 results. What could I be doing wrong ?

-mohan

0 Karma

mohan94
New Member

Ok, responding to my own question. The problem happens only when epoch_time_2 was 'now' i.e you can't query something in the past to current time and get the exact results. epoc_time_2 should be less than now (i tried less by 30 seconds) and then the results were accurate. Hope it helps.

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