splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

Basic metadata search returns the same results over and over

Open XSchelin opened this issue 6 years ago • 4 comments

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 avatar Dec 04 '19 21:12 XSchelin

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

XSchelin avatar Dec 04 '19 21:12 XSchelin

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

amysutedja avatar Sep 09 '20 23:09 amysutedja

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.

akaila-splunk avatar Sep 29 '21 13:09 akaila-splunk

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

ashah-splunk avatar Oct 18 '21 16:10 ashah-splunk