TrueNAS SCALETrueNAS SCALE Nightly Development Documentation
This content follows experimental early release software. Use the Product and Version selectors above to view content specific to a stable software release.

TrueCommand

Truecommand Namespace

The truecommand namespace has three commands and is based on TrueCommand management functions found in the SCALE API and web UI. It provides access to system TrueCommand setting methods through the truecommand commands.

Truecommand Commands

The following truecommand commands allow you to update or view current TrueCommand configuration settings, add an API key, or enable/disable the TrueCommand connection in SCALE.

You can enter commands from the main CLI prompt or from the truecommand namespace prompt.

Interactive Argument Editor (TUI)

Enter the -- flag following any CLI command to open the interactive arguments editor text-based user interface (TUI).

Click for more information

The interactive argument editor is a text user interface (TUI) that can help enter complex commands with multiple configurable properties. It shows expected properties, defaults, input types (string, boolean, integer, or array), and can include command instructions or warnings.

Optional properties, indicated by the # symbol, are disabled by default. Required properties are enabled. Do not disable properties that are enabled by default.

To configure required properties, enter a space after the colon then add the value.

To enable optional properties, delete # from the corresponding line.

Some required properties are disabled if they are part of a pair of properties where one or the other is required. Select one property to enable and enter a value.

Press F2 or click Save to save the modified file.

Press F10, Esc, or click Quit to exit the TUI. The command automatically executes upon exit.

Config Command

The config command returns a table with SCALE TrueCommand configuration settings.

Using the Config Command

Description

The config command does not require entering a property argument. Enter the command then press Enter. The command returns a dictionary with the system-assigned ID number for the TrueCommand configuration, the API key, remote IP address, and enabled and service status.

Usage

From the CLI prompt, enter:

system truecommand config

Command Example
system truecommand config
+-------------------+----------------------------------+
|                id | 1                                |
|           api_key | <null>                           |
|           enabled | false                            |
| remote_ip_address | <null>                           |
|        remote_url | <null>                           |
|            status | DISABLED                         |
|     status_reason | Truecommand service is disabled. |
+-------------------+----------------------------------+

Connected Command

The connected command returns a table with SCALE TrueCommand connection settings and status.

Using the Connected Command

Description

The connected command does not require entering a property argument. Enter the command then press Enter. The command returns a dictionary with the TrueCommand IP, URL, and connection and status information.

Usage

From the CLI prompt, enter:

system truecommand connected

Command Example
system truecommand connected
+-----------------+----------------------------------+
|       connected | false                            |
|  truecommand_ip | <null>                           |
| truecommand_url | <null>                           |
|          status | DISABLED                         |
|   status_reason | Truecommand service is disabled. |
+-----------------+----------------------------------+

Update Command

The update command allows you to update TrueCommand configuration.

Use auth api_key create to obtain a new API key.

Using the Update Command

Description

The update command has two property arguments, enabled and api_key. If enabled is set to true, the TrueCommand instance is connected and enabled. It prompts you to enter the api_key argument.

Use api_key to add a new or replace an existing API key with a new key generated using either the UI or the auth api_key create command. Enter property arguments using the = to separate propery and value. Double-quote values with special characters. Enter the command string then press Enter. The command returns an empty line.

Usage

From the CLI prompt, enter:

system truecommand update enabled=true api_key="apiKeyString"

Command Example
system truecommand update enabled=false