Developing Dashboards, Views, and Apps for Splunk Web

 


Advanced view building

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.

Advanced view building

Every page in Splunk Web is custom built. These pages, or views, are XML files stored in an App's view directory. Views are made out of a library of modules. Every module is actually a directory of CSS, JavaScript, HTML and, in some cases, Python and Flash.

Views can be modified to fit your specifications. Or, you can create your own views from scratch. If you're just starting out, check out the simplified view XML described earlier in this manual. You should only use the advanced XML if you've tried the simple XML and it doesn't support your use case. For example, if you want to build a search view, or you want to use modules that aren't available to the simple XML.

Here's a general outline of the basic concepts for configuring views:

  1. Decide which modules you want to include in your view.
  2. Configure each module in <view_name>.xml.
  3. Put <view_name>.xml in the views directory, inside your app directory: $SPLUNK_HOME/etc/apps/<App_name>/data/ui/views/
  4. If you have more than one view for your App, arrange them in the UI by following the instructions in Create view collections.
  5. To change the CSS for a view, Change your app's style.

Note: If you're customizing your App by modifying the xml outside of Splunk Manager, you can reload the configs by navigating to the following.

Get a brand new view to show up:

https://localhost:8089/services/apps/local?refresh=true 

(against the Splunkd management port)

Reload a specific view:

https://localhost:8089/services/apps/local/<appname>?refresh=true 

(against the Splunkd management port)

Reload all views:

http://localhost:8000/app/<appname>/

(against the SplunkWeb UI port)

Types of views

There are three main types of views: dashboards, form searches and search views. Each type of view is defined by a Mako template, located in $SPLUNK_HOME/share/splunk/search_mrsparkle/templates/view/. Mako templates are HTML files with support for Python. Splunk's templates define page layout; basically, how each element fits into a page.

Dashboards

Form searches

Search views

More Splunk Web customizations

Customize your App's look and feel. Here are a few things you can do:

Learn more about what you can do here.

Types of modules

There are a number of modules from which you can build your view. For example, the search bar within a page is one module. Modules also include graphs and charts, text entry boxes, links, drop-down menus and other components. For a general overview of how modules work, read How modules work.

Modules live in $SPLUNK_HOME/share/splunk/search_mrsparkle/modules/. For a complete list, see the Module reference. Or, append ?showsource=true to any view's URL to see the hierarchy of modules in the page. For example:

http://localhost:8000/en-US/app/search/charting?showsource=true

Note: Replace localhost:8000 with your installation host and port.

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 , 4.0.7 , 4.0.8 , 4.0.9 , 4.0.10 , 4.0.11 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!