Skip to content

Commands

PKing70 edited this page Jan 23, 2020 · 9 revisions

Commands can be accessed via the Command palette. Some commands are also available in the Splunk view container in the action bar.

Opening the Command Palette

Windows

Ctrl + Shift + P

Mac

+ Shift + P (Mac)

Extension Commands

  • splunk.search.adhoc - runs an ad-hoc search. Results render in the Splunk channel in the OUTPUT view tab.
  • splunk.savedSearch.run - runs a Splunk Enterprise saved search. Results render in the Splunk channel in the OUTPUT view tab.
  • splunk.savedSearches.refresh - requests saved searches from the configured Splunk Enterprise instance.
  • splunk.new.modviz - creates scaffolding for a Splunk Enterprise custom visualization.
  • splunk.new.command - creates scaffolding for a Splunk Enterprise custom search command.

Running a Saved Search using the Command Palette

Prerequisites

  • Configure the Splunk Enterprise REST URL setting in Visual Studio Code.
  • Configure the Token setting in Visual Studio Code.

For more information, see Extension Settings.

Procedure

  1. Open the command palette.
  2. Enter Splunk: Run Saved Search.
  3. Choose a saved search from the dropdown menu.
  4. Results will be written to the OUTPUT console.

Running a Saved Search using the Activity Bar

Prerequisites

  • Configure the Splunk Enterprise REST URL setting in Visual Studio Code.
  • Configure the Token setting in Visual Studio Code.
  • Set the Enable Splunk Explorer setting in Visual Studio Code to enabled.

For more information, see Extension Settings.

Procedure

  1. Select the Splunk Explorer item in the activity bar.
  2. Expand Saved Searches.
  3. Click the search icon.