Updated on 2022-11-30 GMT+08:00

Managing Command Sets

To relieve you from complicated and repetitive workloads on adding a large number of commands to command rules, CBH provides command sets for you, which includes common commands and parameters used for Linux hosts and network devices.

This topic walks you through how to create, view, modify, and delete a command set.

Prerequisites

You have obtained the permissions to manage the Cmd Rules module.

Creating a Command Set

  1. Log in to the CBH system.
  2. Choose Policy > Cmd Rules > CmdSet to go to the command set list page.

    Figure 1 Command set list

  3. Create a command set.

    1. Click New in the upper right corner of the page to switch to the New Command Set dialog box.
    2. Configure the command set name.

      The command set name must be unique in the CBH system.

    3. Click OK. You can then view the new command set on the CmdSet tab.
      Figure 2 Creating a Command Set

  4. Add commands to the command set.

    1. In the row of the command set you want to add commands, click Command in the Operation column. The Command dialog box is displayed.
    2. Select command sets or a single command.

      Currently, common commands for Linux and Network devices are preset in the CBH system.

    3. Click OK.
      Figure 3 Adding commands

Querying and Editing a Command Set

  1. Log in to the CBH system.
  2. Choose Policy > Cmd Rules > CmdSet to go to the command set list page.

    Figure 4 Command set list

  3. Query a command set.

    Quick search: Enter a keyword in the search box to quickly query command sets by command set name, command, and/or parameter.

  4. Click the command set name or click Manage in the row of the command set in the Operation column.

    Figure 5 Command set details

  5. View and edit basic information.

    In the Basic Info area, click Edit. In the displayed dialog box, edit the basic information.

    You can edit CommandSet Name. The Department cannot be changed.

  6. View and edit commands and parameters in the Command area.

    • To add preset commands or parameters, click Add in the Command area and select preset commands in the displayed dialog box.
    • To delete a command or parameter, locate the row containing the command or parameter you want to delete and click Remove.
    Figure 6 Viewing command and parameters

Deleting a Command Set

  1. Log in to the CBH system.
  2. Choose Policy > Cmd Rules > CmdSet to go to the command set list page.
  3. To delete one command set, click Delete in the Operation column of the row where the command set locates.
  4. To delete multiple command sets at a time, select the ones you want to delete and click Delete at the bottom of the list to delete all selected command sets together.