Developing Dashboards, Views, and Apps for Splunk Web

 


Use XML schemas

NOTE - Splunk version 4.x reached its End of Life on October 1, 2013. Please see the migration information.

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

Contents

Use XML schemas

Starting with version 4.1, Splunk provides RelaxNG formatted schemas for the view XML, including the simplified dashboards, simplified form searches, advanced dashboards and views. Also, there are schemas available for the navigation XML, the setup XML and manager pages XML. You can find all of these schemas off the info endpoint:

http://localhost:8000/info

These schema files are in RelaxNG compact syntax (*.rnc). But you can convert to other formats with Trang. Trang is an open source tool that lets you convert between different XML schema formats.

Here's an example of using Trang to convert from Relax to RelaxNG

java -jar trang.jar -O rng all.rnc all.rng

Files

Here's a descriptive list of all the files available from the info endpoint:

File Description
all.rnc Serves as a single entry point for all of the registered RelaxNG schemas. All of the schemas are written in RelaxNG compact syntax and are automatically converted to the full RelaxNG schema using Trang.
view.rnc Covers all 3 forms of view XML.
nav.rnc Covers the app nav XML,
manager.rnc Placeholder schemas for management XML files.
setup.rnc Covers the app setup XML.


Validation

Splunk provides a validation script, validate_all.py, located at:
$SPLUNK_HOME/share/splunk/search_mrsparkle/exposed/schema/

This script inspects the UI XML files present here in Splunk installation:

$SPLUNK_HOME/etc/

To validate your XML files, first navigate to the location listed below and then run the script:

cd $SPLUNK_HOME/share/splunk/search_mrsparkle/exposed/schema/
$SPLUNK_HOME/bin/splunk cmd python validate_all.py

This documentation applies to the following versions of Splunk: 4.3 , 4.3.1 , 4.3.2 , 4.3.3 , 4.3.4 , 4.3.5 , 4.3.6 , 4.3.7 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!