Using Sisense CLI Commands
In addition to the REST API, Sisense includes a CLI (Command Line Interface) for executing various Sisense-related commands.
To access the Sisense CLI:
-
Connect to your Linux host using SSH (in multi-node instances, this can be on the bastion host where Sisense was deployed).
-
Check that the home directory of the install user contains a file "add_completion-ns-sisense.sh".
If Sisense was installed using the Provisioner, or you would like to configure Sisense CLI on a non-installation machine, use the following command to generate a CLI file:
kubectl get cm --namespace sisense add-completion -ojsonpath='{.data.*}' > add_completion-sisense.sh
-
Run the command:
source add_completion-ns-sisense.sh
. -
Follow the prompts to log in.
Note:
- The user must be a valid Sisense Admin and have local user credentials.
- Make sure that the Sisense address is accessible via the machine you are running these commands from. You can verify this by running the command:
wget {your sisense URL}
. For example,wget https://bi.sisense.com
. - Make sure that the correct server is used for the connection. The server connected to for the REST API is done via DNS entries. This means that the login would be done using the cluster address rather than going through the local configured interface's address. This could cause the login to be done with an incorrect server.
-
You can now run Sisense commands in the format
si <group name> <command> <parameters>
.Example
If your command is part of the DataGroups group, your command would be:
si datagroups list
-
If the si command prompts you to log in, run the following command:
login_sisense {sisense url}
.Example:
login_sisense https://bi.sisense.com
.Note:
Be sure there is no trailing slash (/) at the end of the URL.
-
Complete the login process.
The tables below list the Sisense commands.
DataGroups
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all data groups. Example:
|
|
create |
Create a new data group. Example:
|
Mandatory:
Optional:
|
rename |
Rename a data group. Example:
|
Mandatory:
|
update |
Update a data group. Example:
|
Mandatory:
Optional:
|
assign |
Assigns an ElastiCube to a data group. You can also pre-assign an ElastiCube (a draft) to a data group. Example:
|
Mandatory:
|
attach |
Attaches a node to a data group. Example:
|
Mandatory:
|
detach |
Detaches a node to a data group. Example:
|
Mandatory:
|
delete |
Deletes a data group. Example:
|
Mandatory:
|
ElastiCube
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all ElastiCubes. Example:
|
|
start |
Starts an ElastiCube. Example:
|
Mandatory:
|
stop |
Stops an ElastiCube. Example:
|
Mandatory:
|
delete |
Deletes an ElastiCube. Example:
|
Mandatory:
|
detach |
Detaches an ElastiCube. Example:
|
Mandatory:
Optional:
|
attach |
Attaches an ElastiCube. Example:
|
Optional:
|
build |
Builds an ElastiCube. Example:
|
Mandatory:
Optional:
|
import |
Import an ElastiCube. Example:
|
Optional:
|
reset |
Deletes all ElastiCubes from a database and storage Example:
|
|
export |
Exports an ElastiCube. Example:
This command exports the ElastiCube to /opt/sisense/storage/backups/EC3.sdata. Parameters
|
Optional:
|
console |
Starts mclient console for a specific Elasticube. Example:
|
Optional:
|
Deployment
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all nodes. Example:
|
Optional:
|
add |
Adds a node to the system. Example:
|
Mandatory:
|
remove |
Removes a node from the system. Example:
|
Mandatory:
|
instances |
Lists all instances in the deployment. Example:
|
|
version |
List all the deployment nodes' versions. Example:
|
Datasources
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all data sources. Example:
|
Optional:
|
query |
Query JAQL on data source. Example:
|
Mandatory:
Optional:
|
sql |
Executes an SQL query on data source. Example:
|
Mandatory:
|
System
Commands | Description | Parameters |
---|---|---|
list |
Displays versions of your services. Example:
|
|
Backup |
Backs up Sisense metadata stored in the Sisense application database, system configuration information, and if you include your farms, Sisense ElastiCube data is backed up. The command below generates an archive of all these files in the following location: /opt/sisense/storage/system_backups/sisense_assets_collector_[date]. Note: Files you configured on shared storage, such as automated emails, plugins, language files, branding files and custom connectors are not backed up.
To a log of the back up, enter the following command:
|
|
Restore |
Restores Sisense from an archive file created with the Back Up command described above.
"/opt/sisense/storage/" or "/opt/sisense/storage/system_backups/" may be added automatically, causing the command above to return a syntax error. In such cases, run the command without that part of the path. |
For more info, see Backing up and Restoring Sisense
Configuration
Commands | Description | Parameters |
---|---|---|
get |
Gets the configuration value. Example:
|
Mandatory:
Optional:
|
set |
Sets a configuration value. Example:
|
Mandatory:
|
reset |
Resets a configuration to the default value if possible. Example:
|
Optional:
|
Configuring Sisense to Store ElastiCubes on S3 via the Sisense CLI
In the Sisense CLI, run the following command to set:
Run Builds on Local Storage
si datagroups update -name Default -build-on-local (true/false)
Upload ElastiCubes to S3
si datagroups update -name Default -build-ons3 (true/false)
Automatically Run the Builds on Local Storage
si config set -key management.LocalStoragePath -new-value /opt/sisense/local_storage
Note:
Make sure you have enough space to support your ElastiCubes and Sisense recommends you mount with NVMe.
Copy to S3 Bucket Name
si config set -key management.S3bucket -new-value sisensebucket
Define the Bucket Path
si config set -key management.S3path -new-value sisense
Set Your AWS Keys
Access Key
si config set -key management.AWSAccessKey -new-value AKIASTI4JKEDZJXXXXXX
Secret Key
si config set -key management.AWSSecretKey -new-value XOHsMbjhywvA1m30cSf36QXOeEgvSobXXXXXXX/E
Timeout Settings
To accommodate larger cubes, increase the following timeouts:
si config set -key management.ReadinessFailureThreshold - new value: 240
si config set -key management.LivenessInitialDelaySeconds - new value: 900