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
Get Updates on the Splunk Community!

Unlock New Opportunities with Splunk Education: Explore Our Latest Courses!

At Splunk Education, we’re dedicated to providing top-tier learning experiences that cater to every skill ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...