Get help with the CLI
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Get help with the CLI
Find a complete CLI help reference by using the command help. Access the default CLI help page by typing the following in the command line while Splunk is running:
./splunk help
Access help on a specific CLI command, or topic by typing:
./splunk help command name | topic name
For example, access a help page about Splunk CLI commands:
./splunk help commands
Or, access a help page about Splunk search commands:
./splunk help search-commands
Note: Notice the dash (-) between the words: "search" and "commands". This is because the Splunk CLI interprets spaces as breaks. Use dashes between multiple words for topic names that are more than one word.
Some commands require authentication or target host information
Use the auth and uri parameters with any CLI command.
auth
Use auth with commands that require authentication to execute. auth is useful if you need to run a command that requires different permissions to execute than the currently logged in user has.
Note: auth must be the last parameter specified in a CLI command argument.
Syntax:
./splunk command object [-parameter value]... -auth username:password
uri
Use uri to send commands to another Splunk server.
Syntax:
./splunk command object [-parameter value]... -uri specified-server
Specify the target Splunk server with the following format:
[http|https]://name_of_server:management_port
Example: The following example returns search results from the remote "splunkserver" on port 8089.
./splunk search "host=fflanda error 404 *.gif" -auth admin -uri https://splunkserver:8089
Note: For more information about the CLI commands you can run on a remote server, see the next topic in this chapter.
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 , 4.0.7 , 4.0.8 , 4.0.9 , 4.0.10 , 4.0.11 View the Article History for its revisions.