- Created by user-0d7db, last modified by Leesa Gabel on Feb 22, 2023
Though spare in appearance, Asset Manager's command-line interface (CLI) is a powerful tool with many of the same capabilities as Asset Manager's GUI. It also provides some functionality not yet available in Asset Manager's GUI. This section introduces the basic CLI syntax and provides the procedures you are most likely to use.
CLI Menu Structure
CLI commands are organized in tiered menus. Below are the commands available on the primary and secondary tiers.
Primary Tier of CLI | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Top |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Secondary Tiers of CLI | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
authentication |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
certificate |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
connections |
Previous to 4.7, this menu was named "lumeta" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
exit | Will close and logout of the current CLI session | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
help | CONTEXT SENSITIVE HELP AUTO-COMPLETION [enter] - Auto-completes, syntax-checks then executes a command. MOVEMENT KEYS DELETION KEYS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
history | Will display the current session's command line history | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
log |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logout | Will close the SSH connection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organization |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
role |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
support |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
system |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
top | Exit sub-command mode and return to top level | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
user |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
zone |
|
CLI Syntax Tips
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).
Enabling NetFlow Capture
To enable NetFlow capture from the command-line interface:
- Log in to the CLI.
- At the command-line prompt, enter support service packetcapture start
- Exit the CLI.
Retrieving Your System's Hardware ID/ Identifying your UUID
The hardware-id command is useful as it displays the information you'll need to supply FireMon Support to generate a license. You can also access your hardware ID via the
Asset Manager GUI.
- Log in to the CLI.
- At the command-line prompt, enter system hardware-id
The hardware ID displays.
Installing and Activating a License
The certificate license command in the 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 browser interface.
If you have a term license that entitles you to use the system for a limited time, the system 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 Asset Manager 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 license install alice@xenon:/home/alice/license.p12
If the file is not on an SSH server, then use SFTP and your Asset Manager credentials to copy the file to the /tmp directory. Then you would use this syntax:
certificate license install /tmp/license.p12
- Log in to the CLI.
- If you have a term license, type certificate asset manager install <loginname@IPaddress:/directory/license_filename> at the command prompt and press Enter (e.g, certificate asset manager install junebug@10.246.246.159:/users/junebug/Downloads/license.p12.)
- The license installs and you are returned to the command prompt.
- Copy and paste the UUID to an email message and send it to our support team at support@firemon.com. In response, Support will send you a message containing your license key.
- Put the license file you receive from Support in a location that can be accessed by SSH.
The following illustrates the syntax to install an Asset Manager license via the CLI.
- Provide the location of your license file. In the following screen capture,
admin
is the username,connections
-command-center:Desktop/
is the location of the license file, andlicense.p12
is the filename of the license. For example: connections install admin@10.9.0.240:Desktop/license.p12 - Type yes when prompted to continue. The license file loads and a confirmation message displays.
Enable/Disable Data Retention Policy
- At the CLI command-line prompt, enter system device-persistence-policy for the status.
- At the CLI command-line prompt, enter system device-persistence-policy enable to turn it on.
- At the CLI command-line prompt, enter system device-persistence-policy disable to turn it off
Connecting and Disconnecting Scouts
- At the CLI command-line prompt, enter connections connect to connect a Command Center to a Scout
- At the CLI command-line prompt, enter connections delete to delete a Scout connected to the Command Center
Upgrading via CLI
To upgrade to a new version of Asset Manager, or to upgrade your Scouts, use the System Upgrade command, the syntax of which is user@host:path/to/local/file
- At the CLI command-line prompt, enter certificate license install <user@host:path/to/local/file>
- At the CLI command-line prompt, enter certificate license install admin@10.9.0.240:Desktop/upgrade5443.tgz
Open the file you receive to execute the upgrade.
Identifying Your Installed Version
The system version Lumeta command is especially useful when working with Support to Identify your release.
Installing Self-Signed Certificates
If a company uses its own certificates, they'll need to make use of the certificate ssl install
command:
certificate ssl install friendlyName admin@10.9.0.240:Desktop/copyCert.pem
Identifying Your System ID
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 . . .
- system interface list
- Press the Tab key.
The system name and interface ID displays.
Enable/Disable BGP
collector bgp <collector name> enabled [ true | false ]
collector bgp <collector name> peer new <ipaddr> [ enable | disable ] <password> <remote AS>
collector bgp <collector name> peer delete <ipaddr>
Exporting Support Diagnostics
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:
- system configuration (same as configuration export command)
- contents of /var/log
- system "specs" file (name, uuid, Lumeta version, os version, interface config)
Adding a Superuser
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 ]
Exporting the System Configuration
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>
Importing a System Configuration
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>
Using Special Characters in Names
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:
- admin@cc> collector new "before\"after" Zone1 cc:eth0
- admin@cc> collector list
- before"after
- admin@cc> collector new with\ space Zone1 cc:eth0
- admin@cc> collector new "two words" Zone1 cc:eth0
- admin@cc> collector list
- two words
- with space
Connecting Asset Manager Components
Meraki CLI
These commands will enable you to configure the Meraki integration via the Command-Line Interface.
- system feed list meraki
- system feed set meraki enabled [ true | false ] - Enable or Disable the Meraki integration
- system feed set meraki pollInterval posInt - Set the polling interval
- system feed set meraki key apiKey - Provide the API key to Meraki API
- system feed set meraki zone zone [ enable | disable ] - Enable integration for the indicated zone
- No labels