/ tscli Command Reference

tscli Command Reference

Overview

Explains what the feature is or what its benefits are to the user or customer.

Feature

The tscli command line interface is an administration interface for the ThoughtSpot Analytic Search Appliance. Use tscli to take snapshots (backups) of data, apply updates, stop and start the services, and view information about the system.

--include specifies the type of events to include, and can be all, config, or notification.

--detail returns the events in a detail format rather than a tabular summary, which is the default.

--summary_contains <'string1'| 'string2' ...> specifies a string to check for in the event summary. Enclose strings in single quotes, and separate multiple strings with |. Events that match all specified strings will be returned.

--detail_contains <'string1'| 'string2' ...> specifies a string to check for in the detail. Enclose strings in single quotes, and separate multiple strings with |. Events that match all specified strings will be returned.

--attributes <key1='value1'| key2='value2' ...> specifies attributes to match as key=value pairs. Separate multiple attributes with |. Events that match all specified key/value pairs will be returned. Put single quotes around the value(s).

And a time window made up of either:

--since <hours,minutes,days> is a time in the past for where the event audit begins, ending at the present time. Specify a human readable duration string, e.g. 4h (4 hours), 30m (30 minutes), 1d (1 day).

Or both:

--from <yyyymmdd-HH:MM> is a timestamp for where to begin the event audit. It must be of the form: yyyymmdd-HH:MM.

--to <yyyymmdd-HH:MM> is a timestamp for where to end the event audit. It must be of the form: yyyymmdd-HH:MM.

tscli fileserver configure
--user <user_name>
[--password <password>]

Configures the secure file server username and password for file upload/download and the call home feature. You only need to issue this command once, to set up the connection to the secure file server. You only need to reissue this command if the password changes. The parameter <password> is optional. If a password is not specified, you will be prompted to enter it.

Downloads the specified release file and its checksum. Specify the release by number, to the second decimal point (e.g. 3.1.0, 3.0.5, etc.). You may optionally specify the --user and --password to bypass the credentials that were specified when configuring the file server connection with tscli fileserver configure.

Before using this command for the first time, you need to set up the file server connection using tscli fileserver configure.

Uploads the file specified to the directory specified on the secure file server. The <path> parameter specifies the directory to which you want to upload the file. It is based on your customer name, and takes the form /Shared/support/<customer_name>. If you don't know the path to specify, Contact ThoughtSpot. You may optionally specify the --user and --password to bypass the credentials that were specified when configuring the file server connection with tscli fileserver configure.

Before using this command for the first time, you need to set up the file server connection using tscli fileserver configure.

tscli ldap add-cert
<name> <certificate>

Adds an SSL certificate for LDAP. Use only if LDAP has been configured without SSL and you wish to add it. Use <name> to supply an alias for the certificate you are installing.

tscli ldap configure

Configures LDAP using an interactive script. You can see detailed instructions for setting up LDAP in About LDAP Integration.

Extracts logs from the cluster. Does not include any logs that have been deleted due to log rotation.

Required parameters are:

--include <selector | glob> is a comma separated list of logs to include. Each entry is either a selector (one of all, orion, system, or ts) or a glob for matching files. Anything starting with / is assumed to be a glob pattern and interpreted via find(1). Other entries are ignored. TIP: put single quotes around the parameter value to prevent undesired glob expansion.

--from <yyyymmdd-HH:MM> is a timestamp for where to begin log collection. It must be of the form: yyyymmdd-HH:MM.

--to <yyyymmdd-HH:MM> is a timestamp for where to end log collection. It must be of the form: yyyymmdd-HH:MM.

Optional parameters are:

--exclude <selector | glob> is a comma separated list of logs to exclude. Each entry is either a selector (one of orion, system, or ts) or a glob for matching files. Anything starting with / is assumed to be a glob pattern and interpreted via find(1).

--out <path> is the location where log tarball is written. If not specified, the tarball will be written in /tmp.

--maxsize is the maximum size to allow. Only fetches logs if the total size is smaller that this value. Can be specified in megabytes or gigabytes, e.g. 100MB, 10GB.

Runs a Unix command on logs in the cluster matching the given constraints. Results are reported as text dumped to standard out, the specified output file, or as tarballs dumped into the specified directory.

Required parameters are:

--cmd <command> is a Unix command to be run on the selected logs. Use single quotes to escape spaces, etc. Language used to specify the command has following rules.

A logfile and its corresponding result file can be referenced using the keywords SRCFILE and DSTFILE. E.g. 'cp SRCFILE DSTFILE'

If there is no reference to DSTFILE in the command, '> DSTFILE' will be appended to the command for output redirection. E.g. 'du -sch SRCFILE' gets automatically translated to 'du -sch SRCFILE > DSTFILE'

If there is no reference to SRCFILE, the content of the log is streamed tot he command using a pipe. E.g. 'tail -n100 | grep ERROR' gets automatically translated to 'cat SRCFILE | tail -n100 | grep ERROR > DSTFILE'

--include <selector | glob> is a comma separated list of logs to include. Each entry is either a selector (one of all, orion, system, or ts) or a glob for matching files. Anything starting with / is assumed to be a glob pattern and interpreted via find(1). Other entries are ignored. TIP: put single quotes around the parameter value to prevent undesired glob expansion.

--from <yyyymmdd-HH:MM> is a timestamp for where to begin log collection. It must be of the form: yyyymmdd-HH:MM.

--to <yyyymmdd-HH:MM> is a timestamp for where to end log collection. It must be of the form: yyyymmdd-HH:MM.

Optional parameters are:

--exclude <selector | glob> is a comma separated list of logs to exclude. Each entry is either a selector (one of orion, system, or ts) or a glob for matching files. Anything starting with / is assumed to be a glob pattern and interpreted via find(1).

--outfile <path> is the file path for printing all the results. By default, results get printed to stdout.

--outdir <directory_path> is the directory path for dumping results from each node, with their original directory structure. This may be used as an alternative to printing output to outfile/stdout.

--cmd_infmt [C | U] specifies if the input file should be compressed (C) or uncompressed (U) before running the command. Don't use this flag if the command works on both.

--cmd_outfmt [C | U] specifies if the output file generated by the command will be compressed (C) or uncompressed (U). Don't use this flag if the output file will be of the same format as the input file.