NCM Device Template
In the Device Template section, administrators can manage the configurations associated with NCM devices. Each NCM device is assigned a unique template based on its Object Identifier (OID). These templates serve as guidelines for executing backup, restore, and synchronisation operations on the startup and running configurations of network devices.
The NCM device template, assigned based on the sysoid of the device, plays a pivotal role in enabling essential functions such as backup, restoration, and synchronisation of configuration files. If, for any reason, a template is not automatically assigned to an NCM device, administrators have the option to manually add the template, either a pre-defined template or a custom created template from the NCM Device Inventory.
Navigation
Go to Menu. Select Settings . After that, select Network Config Settings . Select Device Template. The list of all the NCM Device Templates is displayed on the screen.
Device Template Screen
Field | Description |
---|---|
Template | The name of the template used to identify the template. |
Vendor | The vendor for which the template is created. |
OS Type | The OS type of the network device for which the template is created. |
Devices | The number of monitors to which the template is currently mapped. Select the number in this field to view the monitors to which the Device Template is assigned |
Actions | Select to display permissible actions for the Device Template: - Edit: This button is used to edit a device template. - Clone: This button is used to clone the device template. - Download XML/JSON: This button is used to download the device template in the XML/JSON format. - Delete: This button is used to delete a template from Motadata AIOps. |
Create Custom Template
Motadata AIOps empowers administrators with the flexibility to create custom templates tailored to specific NCM devices. This customization ensures that you can create a custom template when any of the pre-defined templates are not mapped to a NCM device .
When creating a custom template, administrators can specify details for backup running configuration, backup startup configuration, sync config, and restore config.
Navigation
Go to Menu. Select Settings . After that, select Network Config Settings . Select Device Template and then select Create Template button to create a custom template.
Create Custom Template Screen
This screen empowers administrators to define custom templates for specific NCM devices, ensuring precise control over configurations. Here's a breakdown of the fields on this screen:
Field | Description |
---|---|
Device Template Name | Enter a distinctive name for your template, providing an easily identifiable reference for configuration management. |
Description | Add a brief description to your template, offering insights into its purpose or any specific details relevant to the configuration guidelines. |
Vendor | Specify the name of the device vendor for which you are creating the template, aiding in categorization. |
OS Type | Enter the Operating System name of the targeted device, ensuring that the template aligns with the specific requirements of the device's OS. |
Delay Time (ms) | Customize the delay time in milliseconds, dictating the interval Motadata AIOps should wait after executing a command and before reading the output. This feature enhances the execution of commands. The default time is set at 1000 ms, but you can adjust it to suit your needs. |
Protocol | Choose the preferred protocol for backup file transfer. Under the selected protocol, define backup commands to ensure file transfer during configuration processes. |
Upon selecting your preferred protocol in the custom template creation process, the next step involves specifying operations such as Backup Running Configuration, Backup Startup Configuration, Backup Restore Configuration, Backup Sync Configuration, and Get Hardware Information. The default display is for Backup Running Configuration, and by selecting the Add Operation button, you can add operations based on your specific requirements.
Under each operation, you have the flexibility to define commands relevant to the selected operation, serving as guidelines for Backup, Restore, and Sync Operations. Here's an overview of the key fields for specifying commands:
Field | Description |
---|---|
Command | Specify the command to be executed based on the selected operation. This customization allows you to tailor commands to your precise configuration needs. Apart from the commands, you can also use a set of pre-defined macros in this field to provide inputs to the template. |
Timeout(ms) | Define the time Motadata AIOps should wait to receive output after command execution. The operation will timeout if no output is received within the specified time. |
Prompt | Choose the prompt that Motadata AIOps should identify after executing the command. This enables precise execution of the subsequent Prompt Command specified in the next field. In case you want to add a prompt that is not already available in the list, you can do so by clicking on option |
Prompt Command | Select the specific Prompt Command to be executed in the command prompt after the prompt identified in the previous field. Refer Prompt Commands to understand in detail about the prompt commands available in Motadata AIOps while creating a template. |
Select to add subsequent commands under the operation you have selected.
Select the Add Operation button to add operations for Backup Startup Configuration, Backup Restore Configuration, and Backup Sync Configuration as per your requirement.
Field | Description |
---|---|
Mapped Devices | Select the network devices to associate with the template. The configured commands within the template will be utilized for backup, restore, and synchronization actions on the chosen network devices. This mapping ensures consistency in configuration management across devices. |
Examples of Creating a Custom Template
Backup of Running Config file of a Cisco device to a TFTP server
Consider a scenario where you need to back up the running configuration file of a Cisco device to a TFTP server.
We will map the process of creating a custom template with how the actual commands are executed in the backend. Let us look into the creation of the custom template step by step:
After you click on the Create Template button, enter the details for the Device Template Name, Description, Vendor, OS Type, Delay Time(ms) as per the device for which you are creating the template. After that select the protocol which in our case would be the TFTP protocol.
Under the Backup Running Configuration, you need to enter the details for the Command, Timeout(ms), Prompt, and Prompt Command fields. Let us understand one by one what details need to be entered here.
Enter copy running-config tftp: in the Command field and an appropriate Timeout. Select ]? from the Prompt dropdown and No Command from the Prompt Command dropdown.
The above step is equivalent to the following configuration in the backend:
This means that AIOps will enter the command copy running-config tftp: on the terminal and press 'Enter' and then look for the prompt ]? to execute the Prompt Command which is No Command in this case.
Now, AIOps will look for the prompt ]? to enter the next set of commands as per the configuration mentioned in the template. After entering the command mentioned in the step 3 and pressing Enter, the terminal prompts 'Address or name of the host []?'. Thus, we specified ]? as the Prompt in step 3 as this would enable AIOps to identify which prompt to look for before entering the next command.
Click to enter the next set of backup configuration commands. Now, we need to provide the IP address of the TFTP server as per the prompt received after the command executed in step 3. Enter the macro &[TransferProtocolServerAddress] in the Command field to pass the IP address of the TFTP server through the macro &[TransferProtocolServerAddress] and an appropriate Timeout. Select ]? from the Prompt dropdown and No Command from the Prompt Command dropdown.
The above step is equivalent to the following configuration in the backend:
This means that AIOps will enter the command &[TransferProtocolServerAddress] to pass the IP address of the TFTP server to the terminal, press 'Enter', and then look for the prompt ]? to execute the Prompt Command which is No Command in this case.
Click to enter the next set of backup configuration commands. Now, we need to provide the Filename of the running config on TFTP server where the backup will be stored. Enter the macro &[TransferFileName] in the Command field to pass the filename of the running config on the TFTP server through the macro &[TransferFileName] and an appropriate Timeout. Select # from the Prompt dropdown and No Command from the Prompt Command dropdown.
The above step is equivalent to the following configuration in the backend:
This means that AIOps will enter the command &[TransferFileName] to pass the filename of destination running config file on the TFTP server to the terminal, press 'Enter', and then look for the prompt # to execute the Prompt Command which is LF in this case.
In this way, you can create a custom template to take backup of the running config file of a Cisco device to a TFTP server. Note that this is just an example to understand the creation of a custom template as the template for Cisco device is available in Motadata AIOps by default.
Restoring a Running Config file of a Cisco device from a TFTP server
Consider a scenario where you need to restore the running configuration file of a Cisco device from a TFTP server.
We will map the process of creating a custom template with how the actual commands are executed in the backend. Let us look into the process of configuring the commands for restoring the backup step by step in the same template as we created in the first example:
We have already provided the details to create the custom template for the backup of running configuration in the 1st example. Now let us add the details to restore the running config from the TFTP server in the same template.
Click on the Add Operation button and select the Backup Restore Configuration to add commands for the backup of the running config from the TFTP server. Under the Backup Restore Configuration, you need to enter the details for the Command, Timeout(ms), Prompt, and Prompt Command fields. Let us understand one by one what details need to be entered here.
Enter copy tftp: running-config in the Command field and an appropriate Timeout. Select ]? from the Prompt dropdown and No Command from the Prompt Command dropdown.
The above step is equivalent to the following configuration in the backend:
This means that AIOps will enter the command copy tftp: running-config on the terminal and press 'Enter' and then look for the prompt ]? to execute the Prompt Command which is No Command in this case.
Now, AIOps will look for the prompt ]? to enter the next set of commands as per the configuration mentioned in the template. After entering the command mentioned in the step 3 and pressing Enter, the terminal prompts 'Address or name of the host []?'. Thus, we specified ]? as the Prompt in step 3 as this would enable AIOps to identify which prompt to look for before entering the next command.
Click to enter the next set of restore configuration commands. Now, we need to provide the IP address of the TFTP server as per the prompt received after the command executed in step 3. Enter the macro &[TransferProtocolServerAddress] in the Command field to pass the IP address of the TFTP server through the macro &[TransferProtocolServerAddress] and an appropriate Timeout. Select ]? from the Prompt dropdown and No Command from the Prompt Command dropdown.
The above step is equivalent to the following configuration in the backend:
This means that AIOps will enter the command &[TransferProtocolServerAddress] to pass the IP address of the TFTP server to the terminal, press 'Enter', and then look for the prompt ]? to execute the Prompt Command which is No Command in this case.
Click to enter the next set of backup configuration commands. Now, we need to provide the Filename of the running config on TFTP server where the backup file is stored. Enter the macro &[TransferFileName] in the Command field to pass the filename of the running config on the TFTP server through the macro &[TransferFileName] and an appropriate Timeout. Select ]? from the Prompt dropdown and No Command from the Prompt Command dropdown.
The above step is equivalent to the following configuration in the backend:
This means that AIOps will enter the command &[TransferFileName] to pass the filename of backup running config file on the TFTP server to the terminal, press 'Enter', and then look for the prompt ]? to execute the Prompt Command which is No Command in this case.
Click to enter the next set of backup configuration commands. Now, we need to provide where we need to restore the backup from the TFTP server. Enter running-config in the Command field to specify that the backup needs to be restored on the running config file and specify an appropriate Timeout. Select # from the Prompt dropdown and LF from the Prompt Command dropdown.
The above step is equivalent to the following configuration in the backend:
This means that AIOps will enter the command running-config in the Command field to specify that the backup needs to be restored on the running config file, press 'Enter', and then look for the prompt # to execute the Prompt Command which is LF in this case.
The NCM Device Template section in Motadata AIOps offers a comprehensive approach to network configuration management, allowing administrators to tailor configurations to specific device requirements. Whether utilizing default templates or creating custom ones, this functionality ensures the smooth execution of backup, restore, and sync operations in NCM devices.