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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...