Developing Dashboards, Views, and Apps for Splunk Web

 


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.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.

Feedback submitted, thanks!