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
For a general description of how to use modules, see the Module Overview.
Here you'll find all the modules you will need to build a view. Modules are organized into functional categories.
You can load dynamic descriptions of all the modules in your Splunk instance by hitting the following URI:
http://localhost:8000/en-US/modules
Note: Replace host and port with your installation specifics.
There are four basic modules for page layout and general page properties.
The bar at the top of most views, that contains the logo, says logged in as <user>, and contains the logout and admin links.
This is the bar second from the top in most views. It contains the top level view categories (by default Dashboards Views Saved Searches), and the auxiliary links section (help | preferences | about)
Control menu/actions menu.
This module is persistent, and contains information such as the name of the dashboard, the name of the view, or the name of the view and associated saved search. The titlebar functions as a place for contextual actions, like saving a new search that has been run after loading a view.
None.
This module can display all messages to the user, or can be configured to display just a certain class of messages. Messages might come from searches, alerts, errors, information about indexing status, etc. Each view should have at least one message module to receives messages from the back-end.
This module can display all messages to the user, or can be configured to display just a certain class of messages. Messages might come from searches, from alerts firing, from misconfiguration on the backend, from information about indexing status etc.
The simplest configuration is a single Message instance with filter set to '*' -- meaning it will display all the messages broadcast. However, you can use multiple Message modules with different 'filter' params displayed in separate layout panels throughout a view.
Messages are passed with a defined class, such as splunk.search.error. So if you have two Message instances, one configured with a filter of '*', and another with a filter of splunk.search, the latter will receive the splunk.search.error events, and the "*" instance will not. However when an unexpected message is passed down with the class of splunk.indexing.warn, the splunk.search instance will not display it but the the '*' instance will.
<module name="Message"> <param name="filter">*</param> <param name="clearOnJobDispatch">False</param> <param name="maxSize">1</param> </module>
Modules for search actions.
Descendant modules pick up information passed along by their parents, so each descendant search module adds its own options to the original search. Refine any search by including child modules that add filters, such as fields or time ranges.
The SearchBar module creates a search bar with cancel and submit buttons.
None.
<module name="SearchBar"> <param name="q">host=*</param> <param name="autoRun">True</param>
This example prepopulates the search bar and automatically dispatches the search:
Restrict searches to a specific field. Use this module to configure a form search with only one form field. To configure form searches with multiple forms, use ExtendedFieldSearch (below).
<module name="FieldSearch"> <param name="field">sourcetype</param>
Restrict searches to a specific field. Use this module to configure a form search with multiple form fields. To configure form searches with a single field, use FieldSearch (above).
<module name="HiddenSearch">
<param name="search">sourcetype=$st$</param>
<module name="ExtendedFieldSearch">
<param name="intention">
<param name="name">stringreplace</param>
<param name="arg">
<param name="st">
<param name="default">apache_error</param>
</param>
</param>
</param>
<param name="replacementMap">
<param name="arg">
<param name="st">
<param name="value"></param>
</param>
</param>
</param>
<param name="field">Sourcetype</param>
</module>
</module>
This module takes the context and settings information provided by its ancestors, dispatches the search and redirects the user to see that search in the specified view. When ViewRedirector receives a new context, and onContextChange() is called, it WILL REDIRECT to the specified view.
<module name="ViewRedirector"> <param name="viewTarget">flashtimeline</param> </module>
This module puts a link in the view with the given label. When clicked it will take the context information provided by its ancestors, dispatch the search and redirects the user to see that search in the specified view.
ViewRedirectorLink inherits all the params from ViewRedirector (above).
None.
Runs a search behind the scenes. Passes results on to any children.
Note:
autoRun = true so that the search actually runs.
Note: Read more about configuring valid time strings
<module name="HiddenSearch"> <param name="searchClass">search</param> <param name="searchObject">| metadata type=sources | sort -totalCount</param>
Loads results from a saved search, configured in savedsearches.conf. Either runs the saved search upon load or displays results from the last scheduled run of the saved search.
Note: You must schedule your saved search to run
This example uses a saved search named "All local sources."
<module name="HiddenSavedSearch" autoRun="true"> <param name="savedSearch">All local sources</param>
Adds an intention to any search it receives.
None.
This module implements an invisible control that hardwires which fields the user will see and what order those fields are in. When they are descendants of this module, other modules that display events and summary information will pick up the field list specified here.
None.
<module name="HiddenFieldPicker"> <param name="fields">clientip host uri</param>
This module creates a set of radio buttons with submit and cancel buttons.
Note: Requires HiddenSearch as a parent (or ancestor).
<field>=<radioButtonValue>. When absent, the module will just add <radioButtonValue> to the search.
<module name="RadioButtonSearchField">
<param name="options">
<list>
<param name="selected">true</param>
<param name="value">save</param>
<param name="text">Saves</param>
</list>
<list>
<param name="value">edit</param>
<param name="text">Edits</param>
</list>
<list>
<param name="value">upload</param>
<param name="text">Uploads</param>
</list>
<list>
<param name="value">view</param>
<param name="text">Views</param>
</list>
<list>
<param name="value"></param>
<param name="text">All</param>
</list>
</param>
<param name="label">Show only</param>
This module creates a drop-down menu that users can use to change the timerange. Timerange values and labels are pulled from the configuration in times.conf.
None.
required = False label = Optional label to display above time range picker.
<module name="TimeRangePicker"> <param name="selected">This month</param>
This module launches the field picker, a list of all available fields from which a user can select the fields to display. Descendants of this module that display events and summary information will pick up the field list specified or chosen here.
None.
<module name="FieldPicker"> <param name="fields">host sourcetype source</param>
Switcher modules let you switch between options, such as results displays or other groups of child modules, without switching views. Only one group of child modules is shown at a time. Switcher modules are buttons, pulldown menus, links and tabs.
All switcher modules share these params:
Creates a pull-down menu populated with results from its children. Shows one set of child modules at a time. Children can be serialized -- they pass results on -- or independent.
Default switcher params noted above.
<module name="PulldownSwitcher"> <param name="mode">independent</param> <param name="selected">Messages per minute last hour</param> <param name="label">Show: </param>
Like PulldownSwitcher, this module shows only one child at a time. Displays the results of its child modules in a set of tabs. When the user clicks a different tab, the corresponding child and its descendant modules are shown on screen and all other child modules (and descendants thereof) are hidden.
Default switcher params noted above.
<module name="TabSwitcher"> <param name="mode">independent</param>
Switches between displays based on clicking an icon. Mainly used for switching between viewing results in events view or table view. The button style is determined by a class set in the params.
When the user clicks a different button, the corresponding child and its descendant modules will be shown on screen and all other child modules (and descendants thereof) will be hidden.
Default switcher params noted above.
When the user clicks a different link, the corresponding child and its descendant modules will be shown on screen and all other child modules (and descendants thereof) will be hidden.
Default switcher params noted above.
<module name="LinkSwitcher"> <param name="mode">serializeAll</param> <param name="label">Format options:</param>
To pass a search on as results, format your results modules as children of previous search modules.
Displays a header. Frequently used in combination with switcher modules (eg TabSwitcher and PulldownSwitcher) to display a label for children modules.
None.
<module name="GenericHeader"> <param name="switcherTitle">General Options</param> <param name="label">General Options</param>
The ResultsHeader module creates a label for your results. Use this module to create headers for other modules (these should be children of the ResultsHeader). This module displays a header, for example 23,420 events. Generally placed above a FlashTimeline or above a set of modules implementing paging controls.
This is a dictionary of config values that specifies behavior for a link that the module can show, that sends the user to a different view where this search result will be displayed instead. Contains a 'label' key that is the text of the link, and a 'viewTarget' key that is the view to which the user should be sent. And also a 'popup' key that when True will make the link open a new popup window.
<module name="ResultsHeader"> <param name="entityName">events</param> <param name="prefix">Timeline</param> <param name="entityLabel">Events</param>
<module name="ResultsHeader">
<param name="entityLabel">Events</param>
<param name="link">
<param name="popup">True</param>
<param name="viewTarget">report_wizard</param>
<param name="label">Report on results</param>
</param>
<param name="prefix">Timeline</param>
<param name="entityName">events</param>
The EventsViewer module displays events resulting from the search that its ancestor modules combined to specify. This module is very similar to SimpleEventsViewer, and one of these two modules will in the future be folded into the other.
None.
<module name="EventsViewer"/>
This module waits for the search to complete and then renders a single field from the first row of the results.
None.
This module shows the top N values for a given field, along with the number of events that have the given value.
<module name="SimpleFieldViewer"> <param name="count">5</param> <param name="field">twikiuser</param> </module>
Top x values of multiple fields.
Shows a set of field names, with distinct counts next to them in parentheses. When the user clicks on the field names, a popup layer opens, showing the top 10 values for that field. Clicking then on one of those values will add the proper field=value term and re run the search.
None.
<module name="MultiFieldViewer">
<param name="count">10</param>
<param name="link">
<param name="view">report_wizard</param>
<param name="label">Report on this field</param>
</param>
Renders a list of links. Link lists are generally a combination of a primary field (labelField) and a second, descriptive field (valueField). Optionally specify display params.
Note: Requires HiddenSearch as a parent.
<module name="LinkList"> <param name="initialSortDir">desc</param> <param name="labelFieldSearch">*</param> <param name="valueField">totalCount</param> <param name="labelField">source</param> <param name="labelFieldTarget">searchview</param> <param name="initialSort">totalCount</param>
If you want to chart your results, use these modules.
This module contains a Flash object that is capable of charting almost any search results that the Splunk backend can generate.
The FlashChart module displays your results in a chart.
<module name="FlashChart"> <param name="height">300px</param> <param name="width">100%</param>
This module contains a Flash object that is capable of displaying a chart of number of events over time. This chart will be updated asynchronously while the search is running.
The FlashTimeline module renders the timeline.
<module name="FlashTimeline"> <param name="height">180px</param> <param name="width">100%</param>
Waits for the search to complete, and then renders its final results in a tabular format.
None.
<module name="SimpleResultsTable"/>
This module contains a pulldown that you can use to change between 'column', 'line', 'area' and various other chart types.
None.
<module name="HiddenChartFormatter"> <param name="chart">line</param> <param name="chartTitle">CPU performance in the past 24 hours</param>
Special settings for formatting events on the page.
Events per page.
Note: When used in conjunction with a Paginator module, the Paginator should be a descendent of the Count module, not an ancestor.
selected=true for a list item that item becomes the default setting for a view.
None.
<module name="Count">
<param name="switcherTitle">As List</param>
<param name="options">
<list>
<param name="text">10</param>
<param name="value">10</param>
</list>
<list>
<param name="text">20</param>
<param name="selected">True</param>
<param name="value">20</param>
</list>
<list>
<param name="text">50</param>
<param name="value">50</param>
</list>
</param>
Max lines per event. Create a drop-down that lets you decide between any specified numbers of max lines.
selected=true for a list item that item becomes the default setting for a view.
None.
<module name="MaxLines">
<param name="options">
<list>
<param name="text">5</param>
<param name="selected">True</param>
<param name="value">5</param>
</list>
<list>
<param name="text">10</param>
<param name="value">10</param>
</list>
<list>
<param name="text">20</param>
<param name="value">20</param>
</list>
<list>
<param name="text">50</param>
<param name="value">50</param>
</list>
<list>
<param name="text">100</param>
<param name="value">100</param>
</list>
<list>
<param name="text">200</param>
<param name="value">200</param>
</list>
<list>
<param name="text">All</param>
<param name="value">0</param>
</list>
</param>
Splits events into separate pages and displays a series of links to page around in your data. It must be configured to page either through the 'events' or the 'results' of your search.
Note: It is a good idea to precede EventsViewer with Paginator -- eg EventsViewer is a child of Paginator -- otherwise only one page of events will be displayed.
<module name="Paginator"> <param name="count">100</param> <param name="entityName">results</param> <param name="switcherTitle">As Table</param> <param name="maxPages">10</param>
Set the segmentation type for events.
[param:options] required = True label = This is a list whose items have two required keys, 'text' and 'value'. 'value can be one of raw,inner,outer,full.
selected=true for a list item that item becomes the default segmentation for a view.
<module name="Segmentation">
<param name="options">
<list>
<param name="text">inner</param>
<param name="selected">True</param>
<param name="value">inner</param>
</list>
<list>
<param name="text">outer</param>
<param name="value">outer</param>
</list>
<list>
<param name="text">full</param>
<param name="value">full</param>
</list>
<list>
<param name="text">raw</param>
<param name="value">raw</param>
</list>
</param>
Display a checkbox to toggle soft-wrapping of events. When off, event text breaks in the page only where there is a linebreak in the actual data, and scrollbars appear as necessary. When on, the event text also breaks at the edge of the window.
None.
<module name="SoftWrap"> <param name="switcherTitle">As List</param>
Use the following modules to add web resources to your view.
Supports server side includes for custom content. Additionally, the Mako (see: http://www.makotemplates.org/) template language is supported.
Caution: Splunk's CSS is not scoped. If you want to add CSS to your page, make sure you scope your CSS or you will overwrite Splunk's default CSS.
None.
<module name="ServerSideInclude"> <param name="src">hello_world.html</param> </module>
Set up an inline frame (iframe) to show content from another URL.
<module name="IFrameInclude"> <param name="src">http://www.google.com</param> </module>