2023-Nov-03-R11.1a

Execute CLI Commands

CLI automation is used to retrieve device data by executing specified CLI commands. This automation action is highly customizable, and you can execute different commands on different devices, including but not limited to the existing devices on a map.

In addition, you can use a parser to parse key metrics from the outputs, monitor them on a map, and see the displayed alert if the target parser variable deviates from the Golden Baseline. You can also compare CLI command outputs from different times to view their differences.

  • Execute CLI Overview 1:
    Graphical user interface, text, application

Description automatically generated
  • Execute CLI Overview 2:
    Graphical user interface, text

Description automatically generated with medium confidence
  1. On a map, select Execute CLI Commands from the right-click menu or select Actions > Execute CLI Commands from the map toolbar. The Runbook pane is opened with the Execute CLI Commands node added.
    InformationTip: If a runbook has already been opened, the Execute CLI Commands node will be added to the current Runbook; otherwise, it will be added to the personal Runbook.
  2. Add a command for all target devices by entering the command directly, then click Add.
    InformationTip: To add commands by using templates, click Load CLI Templates. You can also create your own command template. See CLI Template for more details.
    InformationNote: You can also click the  icon and select Schedule Command Execution to schedule CLI command execution from a runbook command node. By default, all devices with commands added in the current node will be loaded to the scheduled task.
    InformationNote: If you want to define the rule about the entered commands, go to the System Management page > Advanced Settings.
  1. Click Run.
    InformationNote: You can set the frequency to recur the execution repeatedly. By default, the Run Once is selected.

  2. After the execution is finished, select a device and a CLI command to view its output.
    InformationNote: You can click the pencil icon to add a note for the command or add a result summary after running a command.
    InformationTip: You can directly click a timestamp from the timeline or the dropdown of the timeline to view historical data or select the data at two time points to compare.

    InformationTip: To reuse the data of command outputs, you can save the command outputs for the selected device and add a tag to explain the data meaning.
    Graphical user interface, text, application, chat or text message  Description automatically generated
  3. If you want to save one node and share it with others, define the target devices. By default, this action applies to all existing devices on the map. To customize target devices, click the icon.
    A picture containing timeline

Description automatically generated
    1. Click Target Device Qualification, which is a node-level device qualification and the qualified devices can only be applied to the current node.
    2. Narrow down the default devices from the current map by setting the criteria with the dynamic method. You can also manually add devices with the static method.
      InformationNote: If you select the Ignore devices on the map for input check box, you can only use the static method to manually add devices as input.
    3. Click Reload Target Devices to make the qualification work.
  4. (Optional) Define a CLI automation and monitor network devices on the map.
  • Select a Parser from the list.
    Information Tip: The system will use device types of all target devices and specified CLI commands to search for available parsers from the Parser Library. and populate them in the list. If only one parser in the Parser Library is matched, the parser will be auto-selected.
    Information

    Tip: With the alert defined for the variable in the CLI command result, it is displayed if the variable deviates from the defined value.

    Graphical user interface, application  Description automatically generated

    Information Note: You can also click Save As to save the defined CLI automation as a Qapp or a Data View Template, or add it as a Qapp or Data View Template node to the current Runbook.
  • Click a number value and Map to Device to expand the definition area.
    Table

Description automatically generated
  • Define the automation.
    A picture containing graphical user interface

Description automatically generated

1) Click Device Highlight to use a random color to highlight the device.
Graphical user interface, text, application, email

Description automatically generated

2) Click the icon behind the device variable to define the alert. Click OK.

Information
Note: You can define the qualification to make the CLI automation take effect for more accurate target devices. By default, it is undefined, and the automation takes effect for all map devices.

3) Click Run to monitor the variables on the map.

Information Tip: To save an action node and its input for reuse, point to it and click the icon to select Save as Favorite.


See also: