Running Python Splunk SDK Test Suite

291 views Asked by At

I'm trying to run the Splunk python sdk test suite and running into connection errors.

I access splunk via company.splunkcloud.net and [email protected]/password for credentials. I'm not entirely sure what should be in my .splunkrc, is the localhost they refer to the agent?

I'm a little lost. Any advice on what's required to run the test suite is much appreciated.

1

There are 1 answers

1
Shakeel On

Are you using Splunk Enterprise or Splunk Cloud?

If you're using Splunk Enterprise, you can test your credentials over curl like so:

curl -k -u [email protected]:changeme https://localhost:8089/services/server/info/server-info

I believe port 8089, the REST API port, is blocked in Splunk Cloud by default so the Python SDK won't be able to connect to it. I would contact support and see if they can unblock the port for you.

Your .splunkrc file should look something like this

host=company.splunkcloud.net
port=8089
[email protected]
password=changeme
scheme=https