Skip to content

Commands

JasonConger edited this page Jan 13, 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 + P

Mac

+ P (Mac)

Extension Commands

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

Running a Saved Search via the Command Palette

Prerequisites

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

For more information, refer the the extension settings page.

Procedure

  • Open the command palette
  • >Splunk: Run Saved Search + Enter
  • Choose a saved search from the dropdown menu
  • Results will be written to the OUTPUT console

Running a Saved Search via the Activity Bar

Prerequisites

  • Configure the Splunk REST URL setting in Visual Studio Code
  • Configure the Token setting in Visual Studio Code
  • Enable Splunk Explorer setting Visual Studio Code is enabled

For more information, refer the the extension settings page.

Procedure

  • Select the Splunk Explorer item in the activity bar
  • Expand Saved Searches
  • Click the search icon