Accessing the CLI

To start the CLI, use the following program:

ZEUSHOME/zxtm/bin/zcli

You can connect to the CLI by logging in to a virtual appliance/cloud instance directly using SSH (see Remote Login to the Traffic Manager) and typing the command zcli. Alternatively, you can connect remotely by specifying the user and host as arguments to the zcli command:

zcli [user@]host:port

For example:

zcli admin@ztm1:9090

Usage and options for zcli can be listed by specifying “--help” as an argument:

zcli -–help

 

Usage: ./zcli [OPTIONS] [user@][host:port] [script file]

Configure the Traffic Manager from a script file or standard input.

 

--user USER Set the username (default: admin)

--passfile FILE Read the password from this file

--nossl Your Traffic Manager does not have SSL enabled admin server

--verbose Verbose output (for testing)

--continue When running a script, continue even if an error occurs

--help Show this help

--version Show the version of this program

--formatoutput Use 'human readable' output, even in script mode

--json Use strict JSON output, even in interactive mode

--timeout SECONDS Set timeout for commands

If no host:port is specified, the local Traffic Manager will be used.

Permissions

The CLI must authenticate itself with the Traffic Manager using a username and password with “Control API” permissions (see Network Design). Any user in the “admin” group has appropriate permissions, and you can add those permissions to other user groups.

By default, the CLI uses the username “admin” to communicate with the Traffic Manager (the --user option can be used to select an alternative username):

$ zcli

Please enter your password for user 'admin' on the local Traffic Manager

Connected to 127.0.0.1:9090

[email protected] >

After the connection is established, the CLI displays a prompt (showing the username and hostname of the Traffic Manager) and waits for a command to be entered:

[email protected] >

Commands can be typed in one at a time. A command history is maintained, so pressing the up and down arrow keys will step back through previous commands. Auto-completion is also available for many commands; pressing the tab key will auto-complete any half-typed command or object name. Pressing ‘tab’ twice will list the valid options.

The command help provides a simple overview of the CLI and suggests help topics to find more information on the available commands: