Configure display options for SPL2 searches in the Search bar
Use the Search bar to help you read, parse, or interpret SPL2 syntax.
Search statements can be long and difficult to read. The Search bar contains features to help you read, parse, or interpret the SPL2 syntax.
-
Syntax highlighting, which displays parts of SPL in different colors. Syntax highlighting is available in 2 different color themes.
-
Line numbering, which identifies each line of your search with a number in the margin.
If you have file system access, you can change the default display options for all users on your Splunk platform deployment. For more information, see Change the default display options for all users.
Turn off syntax highlighting
Turn off syntax highlighting for searches if you have difficulty distinguishing between colors or want a simplified search bar.
Syntax highlighting can make searches easier to read by color-coding commands, arguments, functions, and keywords. The following image shows a search with syntax highlighting:
By default, the Search bar includes syntax highlighting. You can turn syntax highlighting colors off by turning off the advanced editor. This is useful for people who have difficulty distinguishing between different colors.
Change the color theme
You can change the color theme of your search bar when syntax highlighting is turned on.
| Theme name | Description |
|---|---|
|
Default system theme |
Inherits the default system theme. |
|
Light |
|
|
Dark |
|
The following image shows syntax highlighting with the Light theme:
The following image shows syntax highlighting with the Dark theme:
Turn on line numbering
Turn on line numbering in the Search bar to make reading your searches easier.
By default, line numbering is turned off. You can turn on line numbering in the Preferences dialog box.
Change the default display options for all users
Change default display options for all users only if you have file system access.
-
Only users with file system access, such as system administrators, can change the default display settings for all users. If you are using Splunk Cloud Platform and want to change the default display settings for your Splunk system, open a Support ticket.
-
Review the steps in How to edit a configuration file in the Admin Manual.
Follow these steps to change display options in the Search bar globally for all users.