Developing Dashboards, Views, and Apps for Splunk Web

 


Panel reference for simple XML

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

Panel reference for simple XML

If you're building a simple dashboard or form search, use any of the panels listed below. Panels take various configuration options, as well as a few general settings that can be applied to most of the panels listed below. The general settings include:

example

Here's an example of a table panel with three general options and two panel specific options.

<table>
    <title>Look here for errors that you need to care about</title>
    <searchName>Errors in the last 24 hours</searchName>
    <fields>host, source, errorNumber</fields>
    <option name="count">25</option>
    <option name="displayRowNumbers">true</option>
</table>

table

The table panel displays search data as a table. Use the searchName attribute to specify which saved search results to display as a table. Use other general options as specified above.

options

Here are table specific options.

example

Here's an example snippet of a table panel. Set this in a row within a dashboard.

...
  <table>
    <title>Look here for errors that you need to care about</title>
    <searchName>Errors in the last 24 hours</searchName>
    <option name="count">25</option>
    <option name="displayRowNumbers">true</option>
 </table>
...

chart

The chart panel displays search data in chart format. Pair the chart panel with a saved report you've already created. Saved reports contain chart formatting parameters. Saved searches, on the other hand, do not. For more information, see "Saving reports and sharing them with others" in the User manual.

When you load a saved report in the chart panel, your saved report format will also be loaded. However, chart formatting can be overridden inline via the options. Charts support all the general options listed above as well as chart specific options listed below.

options

Here are chart specific options.

example

Here's an example snippet of a chart panel. Set this in a row within a dashboard.

...
<chart>
  <searchString>index=_internal metrics group="pipeline" NOT sendout | 
head 1000 | timechart per_second(cpu_seconds) by processor</searchString>
  <earliestTime>-30h</earliestTime>
  <latestTime>-10h</latestTime>
  <option name="charting.chart">line</option>
  <option name="charting.primaryAxisTitle.text">Time</option>
  <option name="charting.secondaryAxisTitle.text">Load (%)</option>
</chart>
...

event

The event panel displays the search results as individual events. This panel supports the general options listed above and the following options.

example

Here's an example snippet of an event panel. Set this in a row within a dashboard.

...
<event>
  <title>Event view</title>
  <searchString>changelist | head 1000 | dedup changelist</searchString>
  <fields>added deleted changed</fields>
  <option name="showPager">true</option>
  <option name="count">20</option>
  <option name="displayRowNumbers">false</option>
</event>
...

single

The single panel displays a single value (the first row/first column) from search data, regardless of the total size of the dataset. You can change the color of the panel depending on what your search returns. This panel support the following options:

example

Here's an example snippet of a single panel. Set this in a row within a dashboard.

<single>
  <searchString>| metadata type="sources" | stats count</searchString>
  <option name="afterLabel">sources</option>
</single>

If you want to change colors on your single results panel, set up your search with range map:

<single>
    <searchString>index=_internal 404 source="*web_access.log" earliest=-1h |
stats count | rangemap field=count low=0-0 elevated=1-100 default=severe</searchString>
      <title>404s this hour</title>
      <option name="classField">range</option>
</single>

html

The html panel displays inline HTML. The entire contents between the HTML tags will be interpreted literally, and displayed on the page. Remember that any link references, i.e. images, will be relatively homed to the current view location. The html panel does not use any options above (except title) and there are no specific options to set for html.

example

<html>
    This lists all of the data you have loaded into <strong>your</strong> default indexes over all time.
</html>

list

The list panel displays data in a list. Use this panel to display information from saved searches or search results. This panel supports the following options.

required

optional

example

Here's a snippet of a list panel. Set this in a row within your dashboard.

<list>
    <searchName>Top recipients</searchName>
    <option  name="labelField">to</option>
    <option  name="valueField">to</option>
</list>

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.