Help Docs

Configlets in Network Configuration Manager (NCM)

A configlet is a configuration template that is transformed to a CLI configuration string and applied to devices. You can use variables to define dynamic elements, allowing them to act as input variables and take values based on the execution context for simplifying network automation.

Use Case

Often, there is a need to make changes to the running configuration of devices, and in most cases, the same set of changes needs to be applied to multiple devices. While network administrators can manually edit the configuration, the task can be challenging due to the volume of changes and the repetitive nature of the work. Site24x7's Network Configuration Manager (NCM) provides a simple solution through configlets.

You can create a configlet according to the changes that needs to be applied with the required input variables. When the configlet needs to be executed, you can provide the values and select the required devices where it should be executed. 

Adding a configlet

  1. Log in to your Site24x7 account.
  2. Navigate to Network > NCM > Configlets
  3. Click Add Configlet on the top right of the screen. 
  4. Enter the values for the following fields:
    1. Display Name: Provide a unique name to identify the configlet.
    2. Description: Provide an appropriate description for the configlet. 
    3. Execution Mode: Select an Execution Mode from the drop down menu:
      1. File Transfer Mode: To upload a fragment configuration change through TFTP.
      2. Script Execution Mode: To execute a single command on the CLI console.
      3. Advanced Script Execution Mode: To execute a sequence of commands on the CLI console based on prompt action and by adding conditions (if needed).
    4. Vendor: Select a device vendor to ensure that the configlet can be executed on devices provided by this vendor. 
  5. Command: The form changes based on the Execution Mode selected in step 4. 
    1. If you have selected File Transfer Mode or Script Execution Mode: Only the Command field is displayed. You can add multiple commands by clicking the plus + icon beside the field. 
    2. Advanced Script Execution Mode: Add Command according to the Sequence in which it must be executed. Provide values for Prompt, Timeout, Suffix, Delay, and click the pencil icon beside Conditional Action to add Condition, Value (which is a regular expression corresponding to the desired pattern), and the step to be executed on Success or Failure, which can be a step number or end of execution. For more information, refer to the section More on Advanced Script Execution Mode

Viewing configlets

  1. Navigate to Network > NCM > Configlets
  2. View details like Name, Execution Mode, Vendor, and Description.
  3. In the Action column, select:

Editing a configlet

  1. Navigate to Network > NCM > Configlets
  2. Click the pencil  icon beside the configlet that you wish to edit.
  3. Make the necessary changes, then click Save

Deleting a configlet

  1. Navigate to Network > NCM > Configlets
  2. Click the delete  icon beside the configlet that you wish to delete.
  3. In the Delete Configlet pop-up, click Delete

Executing a configlet

  1. Navigate to Network > NCM > Configlets
  2. Click the play  icon beside the configlet that you wish to execute.
  3. In the Execute Configlet screen, provide input values for Configlet Variable(s) (if any). Then select the Device(s) on which the configlet must be executed.

Execution History

  1. Navigate to Network > NCM > Configlets > Execution History
  2. View details like Configlet Name, the Device Name where it was executed, Invoked Time, Invoked By, Execution Time, and Status

More on Advanced Script Execution Mode

The Advanced Script Execution Mode allows users to execute a series of commands on a device through the command line. To do this, you must provide the commands that need to be executed in a specific format, as shown in the examples below. 

Purpose Example 1 Example 2
Executing the first command
<command>show version</command>
<command>show ip route</command>
Command to be executed after a prompt
<command prompt='#'>reload</command>
<command prompt='[confirm]'>delete vlan 10</command>
Command to be executed after a timeout <command timeout='60'>show interfaces</command> <command timeout='45'>show spanning-tree</command>
Command with suffix to avoid pressing Enter <command suffix='$NO_ENTER'>yes</command> <command suffix='$NO_ENTER'>enable</command>
Command which displays a prompt after execution <command prompt='Are you sure?'>write memory</command> <command prompt='Proceed?' timeout='10'>copy running-config startup-config</command>
Command with no expected response after execution <command prompt='$NO_RESPONSE' timeout='5'>clear counters</command> <command prompt='$NO_RESPONSE' timeout='5'>clear logging</command>
Command with placeholder for hostname and timestamp <command prompt='#'>copy running-config tftp:</command>
<command prompt='Destination IP:'>$TFTP_IP</command>
<command>$Hostname_$Timestamp_config_backup</command>
<command prompt='Destination IP:'>backup config tftp</command>
<command prompt='Save as:'>$Hostname_$Timestamp_config_backup</command>
<command>show interfaces status</command>
Command with delay before next command execution <command delay='20'>reload</command> <command delay='15'>write erase</command>

Related Articles

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!