create CLI command
Use this command to create saved searches.
To understand the syntax and examples, see:
Syntax
Note
Before you run the command, note the following points:
- Set up the CLI. For more information, see Managing the product from the command line interface.
- Prefix this command with the following, as appropriate:
- For Windows: itda.bat
- For Linux: ./itda.sh
create -d <hostname> -u <username> [-v] [-s] -w <password> -p <portNumber> -e savedsearch –a <List of attributes> [-l <locale>]
- Angle brackets (< >) indicate a variable value that needs to be user defined.
- Square brackets ([ ]) indicate optional parameters.
The following table describes the parameters used in the syntax:
Parameter | Description |
---|---|
-a | Attributes of the entity that you want to create. You can specify multiple attributes by providing a comma-separated list. This parameter must be in the format You can provide the following attributes to get details about a saved search:
|
-d | Host name of the Console Server. |
-e | The entity that you want to create. Enter |
-p | Port number of the Console Server. |
-u | User name to use to connect with the Console Server. |
-w | Password corresponding to the user name to use to connect with the Console Server. |
-v | (Optional) Version of the IT Data Analytics product. |
-s | (Optional) Indicates an HTTPS connection. |
-l | (Optional) Indicates the locale in which you want to display messages when the command is run. You can set one of the following locales:
By default, the messages are displayed in the locale of the system on which the CLI is run. The value can be set to one of the following depending on the locale you choose:
Example: If you want to set the locale as Simplified Chinese, you need to specify, |
Example inputs
The following example provides the input for creating a saved search for the time context of "Last 7 days" (10080 minutes).
Note that this saved search is not marked as public and all the inputs containing the space character are enclosed in double quotes.
create -d localhost -u admin -w admin12345 -p 9797 -e savedsearch -a queryName="Star Query for relative time",queryString="*",description="Query with *",relativeMinutes=10080,share=false
The following example provides the input for creating a saved search for the time context, "Aug 16 2013 5:30 PM - Aug 23 2013 8:00 PM".
Note that this saved search is marked as public and all the inputs containing the space character are enclosed in double quotes.
create -d localhost -u admin -w admin12345 -p 9797 -e savedsearch -a queryName="Star Query for absolute time",queryString="*",description="Query with
*",startTime=1376654400000,endTime=1377268200000,absoluteTime=true,share=true
Comments
Log in or register to comment.