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
- The field in the result set to sort on when the link list is first rendered.
initialSortDir = asc | desc
- The direction to sort the results based on the initialSort field.
labelFieldSearch = search string
- The search string to generate when the user clicks on the label field.
- Requires labelFieldTarget to be defined to a valid view.
- The value of the label field is automatically added to the search.
labelFieldTarget = view name
- The view to target if the label field is setup to generate a clickable link that dispatches a search.
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.