Developing Dashboards, Views, and Apps for Splunk Web

 


Add a list

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

Add a list

The list panel displays search results in a list. It's particularly useful if you have a search that generates a set of fields you'd like to link to.

Configure the list panel

The following basic example shows how to add a list to the dashboard you've been building. Use the <list> tag to add a list. You must also specify the field you want to use to generate labels for your list and the field that will populate the values. Use the <option name="labelField"> to create a label for each item in your list and use the <option name="valueField"> to generate values for each item in your list.

The following example creates a list of links for the to field in the Top recipients search:

<dashboard>
 <label>My dashboard</label>
  <row>
   <list>
    <searchName>Top recipients</searchName>
    <option name="labelField">to</option>
    <option name="valueField">to</option>
   </list>
  </row>
</dashboard>

This example references a saved search called Top recipients. Make sure this saved search is shared with all users and roles who access this dashboard. Any saved search referenced in searchName must exist in savedsearches.conf in the App's default or local directory or be set as global.

Specify an inline search

If you want to create a one-off search for your dashboard, you can add it inline to the XML with the <searchString> tag. Note that this method runs your search every time your dashboard is loaded. If you have a long running search or a lot of users accessing this dashboard, using an inline search may create a high load on your Splunk system.

<dashboard>
 <label>My dashboard</label>
  <row>
   <list>
    <title>Top users</title>
    <searchString>host=production | top users</searchString>
    <option name="labelField">users</option>
    <option name="valueField">users</option>
   </list>
  </row>
</dashboard>

Configure list specific options

You can set other configuration options that are only available for list panels, such as the sort direction of the list and the search and view the list links to. For example, this snippet sets the initial sort to be in descending order and links to another view to launch the search in:

<dashboard>
 <label>My dashboard</label>
  <row>
   <list>
    <title>Top users</title>
    <searchString>host=production | top users</searchString>
    <option name="labelField">users</option>
    <option name="valueField">users</option>
    <option name="initialSortDir">desc</option>
    <option name="labelFieldTarget">My custom search view</option>
   </list>
  </row>
</dashboard>

Here's a list of list specific options:

initialSort

initialSortDir = asc | desc

labelFieldSearch = search string

labelFieldTarget = view name

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!