Python SDK
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Contents
Python SDK
Splunk ships with a built-in Python SDK which you can load into a web browser using pydoc.
1. First, set $SPLUNK_HOME:
export SPLUNK_HOME=/opt/splunk
Replace /opt/splunk with your Splunk installation path.
2. Then run:
$SPLUNK_HOME/bin/splunk cmd python $SPLUNK_HOME/lib/python2.6/pydoc.py -p 8080
Set 8080 to whatever port you want to run pydoc in.
3. In a web browser, load http://localhost:8080, or whatever host and port you've run pydoc on. You can load the Splunk modules by clicking on splunk (package) or by loading http://localhost:8080/splunk.html.
Search
You can see all the available modules for search by clicking on search (package). This should load http://localhost:8080/splunk.search.html.
This documentation applies to the following versions of Splunk: 4.1 , 4.1.1 , 4.1.2 , 4.1.3 , 4.1.4 , 4.1.5 , 4.1.6 , 4.1.7 , 4.1.8 View the Article History for its revisions.