Network Configuration Manager Device Templates
Table of Contents
Device Templates for Site24x7's Network Configuration Manager (NCM) define the commands to connect, back up, restore, or perform other configuration-related operations on a device. To perform these operations, the On-Premise Poller connects to the device using protocols like SSH, SSH - SCP, SSH - TFTP, TELNET, and TELNET - TFTP.
Device Templates provide device-specific commands for backing up device configurations, discovering devices in NCM, syncing startup and running configurations, and obtaining hardware details.
Selecting the correct Device Template will ensure smooth functioning for various operations. Configuration-related operations like backup and restore will not function correctly if an incorrect template is selected. If the selected Device Template is not working correctly, you must execute and verify the commands provided on the Device Template details page for that device.
Where can I use NCM Device Templates?
Use case 1
Let's take a Device Template from Cisco as an example. The Cisco IOS router performs various operations as shown below. Each vendor supports a different set of protocols for backing up or uploading configurations and performing other actions. The commands for an operation will differ depending on the protocol and device type.
Figure 1 shows the operations performed using SSH - TFTP/TELNET - TFTP, like Backup Running Configuration, Backup Startup Configuration, Upload Running Configuration, and Upload Startup Configuration.
Figure 1. Commands for operations using SSH - TFTP/TELNET - TFTP
You can view the commands that will be executed for each operation under different protocols for that device. Say the configuration backup fails despite providing the right credentials. In this case, you only need to verify if the commands displayed on this page for the selected protocol have executed correctly on the device. If not, select the appropriate device template.
Use case 2
- Let's take a look at the Brocade Switch Device Template, which supports the following protocols: SSH and SSH - SCP. Other protocols are not displayed, as they are not supported.
- Click SSH/TELNET (see Figure 3). This page displays the commands for Backup Running Configuration. However, there's no option to backup startup configurations here.
Figure 2. View the Brocade Switch SSH/TELNET commands - Click SSH - SCP (Figure 5). This page displays the commands for Backup Running Configuration, and Upload Running Configuration.
Figure 3. Brocade Switch SSH - SCP commands
Viewing NCM Device Templates
- Log in to your Site24x7 account.
- Navigate to Network > NCM > Device Templates.
- Click each template name to view the supported protocols and the commands used for the operations (Figure 5).
Figure 4. Viewing Device Templates
Adding or editing NCM Device Templates
Site24x7's NCM supports creating custom device templates to manage the configurations of any device in your network. With Site24x7's NCM, you can add, edit, and clone device templates as needed.
- Navigate to Network > NCM > Device Templates.
- To add a new device template, click the Add Device Template button as shown in Figure 4 (marked as 1).
- Enter the details for Device Template, Vendor, Device Type, OS, and Description.
Figure 5. Adding NCM Device Templates - Provide the commands to be used for the protocols. By default, SSH/TELNET is available on the page. However, if required, you can add SSH - SCP and SSH - TFTP/TELNET - TFTP, and provide the appropriate commands for Backup Running Configuration (marked as 1 in Figure 5). You can also provide commands for Backup Startup Configuration by selecting it from the drop-down (marked as 2 in Figure 5). Enter the values for:
- Command: The command line displayed on the terminal for which the user has to provide input. You can also provide variables to fetch data here.
- Prompt: The prompt displayed at the end of the command, after which the user response will be entered.
- Timeout (ms): The amount of time NCM must wait for a response.
- LineFeed: Select LF, CR, or CRLF based on your device (LF: Line Feed; CR: Carriage Return; CRLF: Carriage Return Line Feed).
- Prompt Action: The action that will be executed after the prompt is displayed on the terminal. (Provide the appropriate value after the prompt ")?" in Figure 1).
- Click the X icon to delete the row (marked as 1 in Figure 5).
- Click the plus icon + to add a row (marked as 2 in Figure 5).
- Click the trash icon
to delete the section (marked as 3 in Figure 5).
Figure 6. Actions while adding new NCM Device Templates
- Enter the details for Device Template, Vendor, Device Type, OS, and Description.
- To edit an existing device template, click the pencil icon
beside the appropriate device template as shown in Figure 4 (marked as 2).
- On the Edit Device Template page, you can edit the values for Command, Prompt, Timeout (ms), LineFeed, Prompt Action, and Backup Response (if available).
- You can also add or delete commands and add or remove protocols as needed.
- To clone and customize a device template, select the copy icon beside the respective device template as shown in Figure 4 (marked as 3). With this option, all the commands for all the protocols available for the template will be added to the new template. You can add or remove protocols as needed. However, the SSH/TELNET protocol cannot be removed.
Command field variables
In the example given in Figure 9, after the question "Address or name of the remote host []?", the IP Address of the TFTP server must be provided. The TFTP server address differs based on the On-Premise Poller from where the device is monitored. So, the variable needs to be fetched with specific commands. Provided below is a list of variables that are supported in NCM Device Templates:
Serial number |
Variable |
Values |
1 |
${UserInput:tftp_server_address} |
On-Premise Poller server IP. For example, 10.10.10.5 |
2 |
${UserInput:EnablePrompt} |
This will be the Enable Prompt configured in SSH/TELNET credential |
3 |
${UserInput:file_name} |
The value will be created based on the device ID to ensure a unique file name |
4 |
${UserInput:HostIpAddress} |
The On-Premise Poller server IP. For example, 10.10.190.5 |
5 |
${UserInput:LoggingLevel} |
Notification selected while enabling change detection will be used |
6 |
${UserInput:scp_server_address} |
On-Premise Poller server IP. For example, 10.10.190.5 |
7 |
${UserInput:scp_username} |
On-Premise Poller SCP Server UserName. For example, admin |
8 |
${UserInput:scp_password} |
On-Premise Poller SCP Server password. For example, admin |
To provide the right IP address, the variable ${UserInput:tftp_server_address} can be used in the Command field of the Device Templates.
Figure 8. Setting command variables
Excluding configuration content from NCM Device Templates comparison
While comparing two device configurations or configuration versions in Site24x7's NCM, you will see all the differences between those versions. These differences include empty lines, inconsequential lines (like the created date), expected differences (like the hostname), or even the certification section of the configuration version.
Sometimes, these differences might cause unexpected changes to a device's status. Figure 6 shows an example of a difference between startup and running configurations that could change the status of the device to down, trouble, or critical, as configured in the Threshold Profile.
Figure 9. Pinpoint differences while comparing device configurations.
To avoid unexpected status changes and to exclude such configuration content from comparison so it does not show up as a difference, Site24x7's NCM uses regular expressions to ignore this content during comparisons.
To modify the criteria to exclude specific content during configuration comparison:
- Log in to your Site24x7 account.
- Navigate to Network > NCM > Device Templates.
- Click the Device Template for which you wish to set the exclude criteria.
- Click Exclude Criteria. You will see the default Exclude Criteria provided in the Device Template and custom criteria if it has been added already. Close the Exclude Criteria pop-up to go back to the Device Template details screen.
- To add, edit, or delete custom criteria, click Edit Device Template on the top-right of the screen. Alternatively, you can click the pencil icon
beside the appropriate device template as shown in Figure 4 (marked as 2).
- Then, click Exclude Criteria. You can edit any existing custom criteria here by modifying the details in the editable fields.
- Click the X icon beside the Description column to delete a previously added criterion.
To add a new criterion:
- Click Exclude Criteria on the Edit Device Template screen.
- Enter the details in a row with blank fields. Or, to add more than one criterion, click the + icon.
- Provide a display name.
- Next, provide the regular expression pattern in the RegEx column. To exclude the configuration content previously shown in Figure 9, you can enter the details as shown below in Figure 10.
Figure 10. Add Exclude Criteria. - Provide details in the Description column.
- Click Save.
Related Articles
- Site24x7's Network Configuration Manager (NCM)
- Network Configuration Manager (NCM) Credentials
- NCM Configuration Summary