This documentation applies to the following versions of Splunk: 4.0 , 4.0.1 , 4.0.2 , 4.0.3 , 4.0.4 , 4.0.5 , 4.0.6
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 $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.
You can see all the available modules for search by clicking on search (package). This should load http://localhost:8080/splunk.search.html.