Though spare in appearance, Lumeta Spectre's command-line interface (CLI) is a powerful tool with many of the same capabilities as Spectre's GUI. It also provides some functionality that is not yet available in Spectre's GUI. This section introduces the basic CLI syntax and provides the procedures you are most likely to use.
CLI commands are organized in tiered menus. Shown here are the commands available on the primary and secondary tiers.
Primary Tier of CLI | |
---|---|
Top | |
Secondary Tiers of CLI | |
certificate | |
collector | |
exit | |
help | |
history | |
log | top |
logout | |
organization | |
role | |
spectre | |
support | |
system | |
user | |
zone | |
To see what's next and display syntax tips while working in it, press ? after a partial command for possible completions plus brief descriptions of the command's purpose and syntax. If you press ?? after a command completes, an expanded description will display. You can navigate down through each menu tier by pressing after entering a single command at that tier ( e.g., system hardware-id ) or you can include the full command, separating each tier's command with a space. Press at the end of the line (e.g., system hardware-id ). Enclose values that have spaces in them such as "Finance Department" in quotation marks (e.g., admin@Organization1> zone new "Finance Department" Organization1). |
To enable NetFlow capture from the Spectre command-line interface:
The hardware-id command is useful as it displays the information you'll need to supply Lumeta Support to generate a license. You can also access your hardware ID via the
Spectre GUI.
The certificate Spectre
command in the Lumeta Spectre CLI enables you to activate a license or find out the activation date of your current license. Licenses, however, are more frequently activated via the Spectre browser interface.
If you have a term license that entitles you to use the system for a limited time, Lumeta Spectre will prompt you to install its key the first time you log in via the CLI. The license counter will begin at that point. You can use the CLI as much as you like; it does not decrement the license counter.
If a command requires a file upload, you have two choices. You can put the file on an SSH server or you can use an SFTP tool like psftp or FileZilla to copy the file to Spectre first. If the file is on an SSH server, then you can refer to it with this syntax: userid@sshserver:/path/to/file. For example if the file is on a server called xenon and you have an account on xenon with the name alice and the file is in your home directory and called license.p12, you can use "alice@xenon:/home/alice/license.p12". certificate spectre install alice@xenon:/home/alice/license.p12 If the file is not on an SSH server, then use SFTP and your Spectre credentials to copy the file to Spectre's /tmp directory. Then you would use this syntax: certificate spectre install /tmp/license.p12 |
The following illustrates the syntax to install an Spectre license via the CLI.
admin
is the username, spectre
-command-center:Desktop/
is the location of the license file, and license.p12
is the filename of the license. For example:spectre install admin@10.9.0.240:Desktop/license.p12
To upgrade to a new version of Spectre, or to upgrade your Scouts, use the System Upgrade command, the syntax of which is user@host:path/to/local/file
The system version spectre command is especially useful when working with Support to Identify your release.
If a company uses its own certificates, they'll need to make use of the certificate ssl install
command:
certificate ssl install spectre admin@10.9.0.240:Desktop/copyCert.pem
To retrieve the full name of a Scout such as spectre32Scout:eth1, which is useful if you don't remember the full name, or want to see the IP address of your system, enter . . .
To run the /api/rest/management/system/diagnostic/export API, use the CLI command: support diagnostics file
This command will return a zip file containing:
Only a superuser can add or remove another user's superuser status. Multiple superusers are allowed. The last one cannot be deleted.
user superuser <userid> [ true | false ]
This command (system configuration export
) exports all configuration data to a remote file. To export the configuration and save the file remotely, run:
system configuration export username@hostname:<path to file>
This command (system configuration import
) imports configuration data from a file you've stored locally. To import configuration from the local system, run:
system configuration import <path to file>
Most symbols can be entered without any special quoting. If you want to include spaces or double quotes as part of a name, however, care must be taken. To use double quotes, enclose the entire string in double quotes and put a backslash in front of each double quote you wish to be part of the name: