Splunk Dev

How to install the Python SDK on a remote machine?

Lowell
Super Champion

I would like to use Splunk's SDK for python on a remote system (e.g. a system with no local splunk install). What is the best way to go about doing that?

Also, the PySDK docs only show you how to get to the docs using pydoc which doesn't work well when you don't have command line or file system access to the splunk server. Is there an exported copy of the pydocs online anywhere?

BTW. I found the question Can I use Splunk’s built-in Python SDK in my own scripts?, and that is somewhat helpful, but doesn't help anyone who is not familiar with python packaging. Also, it doesn't cover any copyright considerations, specifically, is it okay to copy splunk's python libraries to a python install on another machine?

psanford_splunk
Splunk Employee
Splunk Employee

There is a new Splunk Python SDK on GitHub. You can access it here: https://github.com/splunk/splunk-sdk-python

Any questions - psanford@splunk.com or ping us on Twitter: @splunkdev

0 Karma

rroberts
Splunk Employee
Splunk Employee

I have an exported copy of splunk pydoc here -> https://docs.google.com/leaf?id=0B5uKsNjxhyrdMGE1ZDBkNTEtYjI2OC00OGQwLTg3MjMtMjRlNGU3MGVkYmU3&hl=en you can download.

Have you checked out http://code.google.com/p/splunk-labs/wiki/SplunkAuth. This is a community driven site (perhaps a little outdated, Ive tried it on 4.0 and it worked) with an external python SDK example. Look for the section that starts with "This example uses Python and the httplib2 library. You may need to install it for your particular Python instance."

Dont know about copying Splunk's python libraries and the legal ramifications.

Lowell
Super Champion

Yeah, I've looked at the splunk-labs stuff a few times now, but as you pointed out, it seems outdated and not as easy to use as splunk's internal API. (I mean, sure you could reproduce the REST API fairly simply, but it seems a little silly to do so when Splunk already build a full python-based interface that is well maintained and tested.) Thanks for the exported docs. It still seems like splunk should provide an easier way to simply reuse their API from a different machine. (Doing a full splunk install just to get the python libs on a machine seems rather silly too.)

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...