splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
687 stars 369 forks source link

Basic metadata search returns the same results over and over #297

Closed XSchelin closed 2 years ago

XSchelin commented 4 years ago

Project version: 1.6.11 Platform: CentOS Framework: Python 2.7.4 Splunk: Splunk Cloud (7.2.9)

Problem:

I'm getting multiple iterations of results for each search I make. I've tried this with a very basic search:

| metadata type=sourcetypes index=*
| table sourcetype, type, totalCount

For the time range of the past 30 minutes. In Splunk Cloud via the GUI, this gives me results in the hundreds (ranges between ~200 and ~500 so far). When I run the script to just print out each row in results:

  1. I get the same results repeated over and over and over.
  2. At some point it dies out:
xml.etree.ElementTree.ParseError: mismatched tag: line 6706, column 2

What am I missing?

XSchelin commented 4 years ago

This happens on both CentOS and Python, in both Python 2.7 and Python 3.6.

The sample code, once one changes it to .py: example.txt

amysutedja commented 4 years ago

Doesn't repro in OSX client running PY2 and PY3 against splunk-docker, so my guess is it would be CentOS only.

akaila-splunk commented 3 years ago

Hi @XSchelin , We are not able to repro this on our end. We have used similar setup with SDK version 1.6.16(latest) and 1.6.11(mentioned by you). Please try with latest version of SDK(v1.6.16) and let us know if you are still encountering this issue.

ashah-splunk commented 2 years ago

@XSchelin Closing this issue due to no response on it. Please reopen if this is still an issue.