Manage the system using the WEKA CLI
The overview of the WEKA CLI includes top-level commands, command hierarchy, how to connect to another server, auto-completion, and how to check the status of the cluster.
The WEKA CLI is installed on each WEKA server and is available through the weka command. It's possible to connect to any of the servers using ssh and running the weka command. The weka command displays a list of all top-level commands.
Top-level commands
The WEKA CLI is installed on each WEKA server and is available through the weka command. Running this command displays a list of all top-level commands:
$ weka -h
Usage:
weka [--color color] [--help] [--build] [--version] [--legal]
Description:
The base command for all weka related CLIs
Subcommands:
agent Commands that control the weka agent (outside the weka containers)
alerts List alerts in the Weka cluster
audit Commands used for audit in a weka cluster
cloud Cloud commands. List the cluster's cloud status, if no subcommand supplied.
cluster Commands that manage the cluster
dataservice Commands that manage dataservice
diags Diagnostics commands to help understand the status of the cluster and its environment
driver Manage Weka drivers
events List all events that conform to the filter criteria
fs List filesystems defined in this Weka cluster
interface-group List interface groups
local Commands that control weka and its containers on the local machine
mount Mounts a wekafs filesystem. This is the helper utility installed at /sbin/mount.wekafs.
nfs Commands that manage client-groups, permissions and interface-groups
org List organizations defined in the Weka cluster
s3 Commands that manage Weka's S3 container
security Security commands.
smb Commands that manage Weka's SMB container
stats List all statistics that conform to the filter criteria
status Get an overall status of the Weka cluster
telemetry Commands that manage the telemetry gateway
umount Unmounts wekafs filesystems. This is the helper utility installed at /sbin/umount.wekafs.
upgrade Commands that control the upgrade precedure of Weka
user List users defined in the Weka cluster
version When run without arguments, lists the versions available on this machine. Subcommands
allow for downloading of versions, setting the current version and other actions to manage versions.
Options:
--agent Start the agent service
--color Specify whether to use color in output (format: 'auto', 'disabled' or 'enabled')
-h, --help Show help message
--build Prints the CLI build number and exits
-v, --version Prints the CLI version and exits
--legal Prints software license information and exits
The options that are common to many commands include:
-J|--json
Prints the raw JSON value returned by the cluster.
-H|--hostname
Directs the CLI to communicate with the cluster through the specified hostname or IP.
--raw-units
Sets the units such as capacity and bytes to be printed in their raw format, as returned by the cluster.
--UTC
Sets the timestamps to be printed in UTC timezone, instead of the local time of the server running the CLI command.
-f|--format
Specifies the format to output the result (view, csv, markdown, or JSON).
-o|--output
Specifies the columns to include in the output.
-s|--sort
Specifies the order to sort the output. May include a '+' or '-' before the column name to sort by ascending or descending order.
-F| --filter
Specifies the filter values for a member (without forcing it to be in the output).
--no-header
Indicates that the column header should not be shown when printing the output.
-C|--CONNECT-TIMEOUT
Modifies the default timeout used for connecting to the system via the JRPC protocol.
-T|--TIMEOUT
Modifies the default timeout for which the commands wait for a response before giving up.
--color
Controls the usage of color in the outputs. Possible values: enabled, disabled, or auto.
Default: auto. It automatically determines whether to enable color based on the output destination. If the output is a terminal that supports color, it is enabled; otherwise, it is disabled.
Commands hierarchy
Most WEKA system top-level commands are the default list command for their own collection. Additional sub-commands may be available under them.
Example: The weka fs command displays a list of all filesystems and is also the top-level command for all filesystems, filesystem groups, and snapshot-related operations. It is possible to use the -h/--help flags or the help command to display a list of available commands at each level, as shown below:
Connect to another server
Most WEKA system commands deliver the same result on all cluster servers. However, it is sometimes necessary to run a command on a specific server. To do this, use the -H/--hostname option and specify the hostname or IP address of the target server.
CLI auto-completion
Using bash you can use auto-completion for CLI commands and parameters. The auto-completion script is automatically installed.
To disable the auto-completion script, run weka agent autocomplete uninstall
To (re-)install the script on a server, run weka agent autocomplete install and re-enter your shell session.
You can also use weka agent autocomplete export to get the bash completions script and write it to any desired location.
Standardized CLI command actions and entities
weka commands with different names but similar meanings have been standardized. Preferred names are now documented, while aliases remain for backward compatibility. Most commands now accept both singular and plural forms.
Standardized commands
The first name in each list is the documented one, followed by its aliases. Aliases ensure existing commands and scripts remain functional.
Actions:
add(create,new)remove(destroy,delete)attach(assign)detach(unassign)reset(unset)update(updates)
Entities:
drive(drives)driver(drivers)container(containers)alerts(alert)task(tasks)process(node,processes,nodes)resources(resource)hot-spare(hot-spares,hotspare,hotspares)bucket(buckets)events(event)denylist(blacklist)permission(permissions)client-group(client-groups,clientgroup,client-groups)interface-group(interface-groups,interfacegroup,interfacegroups)service-account(service-accounts,serviceaccount,serviceaccounts)share(shares)list(lists)group(groups)snapshot(snapshots)user(users)policy(policies)
WEKA CLI command output colors
The weka status command and various commands that return tables, such as weka cluster buckets, support colored output by default when executed in a terminal (tty). You can control the use of colors with the --color option or the WEKA_CLI_COLOR environment variable.
Colors are used sparingly and consistently to indicate status:
Green: Indicates that the status is OK.
Yellow: Represents a warning or a transient state, such as initializing or rebuilding.
Red: Indicates an error or an issue that needs attention.
--color option usage
--color option usageThe --color option controls the usage of color in the outputs. It expects one of the following values:
enabled: Forces color output to be enabled, regardless of the output destination.
disabled: Disables color output entirely.
auto: Automatically determines whether to enable color based on the output destination. If the output is a terminal that supports color, it is enabled; otherwise, it is disabled. The Default:
auto
When the auto value is selected, the NO_COLOR environment variable is also respected. If NO_COLOR is set in the environment, color output is disabled, regardless of the output destination.
WEKA_CLI_COLOR environment variable usage
WEKA_CLI_COLOR environment variable usageThis environment variable can set the color output with the same possible values as the --color parameter (enabled, disabled, auto). However, if the --color parameter is specified, it overrides the WEKA_CLI_COLOR environment variable.
CLI Boolean value aliases
The CLI supports aliases for Boolean options across all commands. This support accepts values like yes, no, true, false, on, off, y, or n. The system automatically converts these values to the internal true/false format.
Using aliases streamlines administrative operations and provides a consistent, flexible way to configure Boolean parameters. This eliminates the need to remember specific command-by-command requirements.
Example
The argument <on> accepts any of the supported Boolean aliases:
Accepted values for a Boolean argument include: yes, no, true, false, on, off, y, or n.
Cluster status
The weka status command displays the overall status of the WEKA cluster.
Examples:



Last updated
