Help Docs

Configlets in Network Configuration Manager

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 need to be applied with the required input variables. When the configlet is ready to be run, you can provide the values and select the required devices to 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. Script Execution Mode: Select an option from the drop down menu:
      1. Basic: To execute a single command on the CLI console.
      2. Advanced : 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. Basic: Only the Command field is displayed. You can add multiple commands by clicking the plus icon + next to the field. Click the x icon beside a command to delete it. 
    2. Advanced: 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 the 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 the execution. For more information, refer to the section More on Advanced Script Execution Mode
  6. Click Save Configlet.

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 Configlet

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:
    1. Configlet Variable Values: Toggle between Fixed for all devices and Unique value for each.
      The following values will be taken from monitor details: MONITORNAME, DISPLAYNAME, GROUPNAME, STATUS, MONITORTYPE, POLLFREQUENCY, MONITORURL, DOWNREASON, DOWNTIME, INCIDENT_TIME, POLLER_IP, NETFLOW_IP, and NETFLOW_PORT. For example, if you want to replace the IP address of the On-Premise Poller from the monitor details, you can enter ${POLLER_IP} in the appropriate variable field. Additionally, predefined values can be substituted from Admin > Configuration Profiles > Global Parameters. The value can be entered as ${key}, where key is the global parameter (as given exactly) in the Site24x7 client. 
    2. Configlet Variable(s): Provide input values (if any) if you have selected Fixed for all devices in Configlet Variable Values step. Then select the Device(s) on which the configlet must be executed.
    3. Upload File: You can upload a CSV file with unique values for each device when selecting Unique value for each in the Configlet Variable Values step. To ensure the correct format, click Download Sample File, update the required values, and then upload the CSV by clicking Browse and selecting the file from your system.
      NoteConfiglets can be executed on devices monitored by an On-Premise Poller with version 6.3.0 or higher.

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
show version
show ip route
Command to be executed after a prompt
reload
delete vlan 10
Command to be executed after a timeout show interfaces show spanning-tree
Command with suffix to avoid pressing Enter yes enable
Command which displays a prompt after execution write memory copy running-config startup-config
Command with no expected response after execution clear counters clear logging
Command with placeholder for hostname and timestamp copy running-config tftp:
$TFTP_IP
$Hostname_$Timestamp_config_backup
backup config tftp
$Hostname_$Timestamp_config_backup
show interfaces status
Command with delay before next command execution reload write erase

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!