Documentation forNetwork Configuration Manager

Create and manage device templates

NCM provides default device templates for many commonly used devices. You cannot edit the default templates. If you want to change a default template, or you need a template for a different type of device, you can create a custom template.

Use either of the following methods to create or edit device templates in NCM:

  • Use the interactive wizard to guide you through the options. The interactive wizard can be used to create device templates for CLI-based devices. You can use it to specify the commonly used commands.

  • Use the XML editor. You can use the XML editor to create device templates for menu-based devices and to include less common device template commands.

See the following sections:

Before you start

  1. If you plan to create a device template for a different device type, first explore the NCM content exchange page on THWACK to see if someone else has already created a template for that device type. If so, you might be able to use that device template as-is or edit it to meet your needs. You can import device templates from THWACK.
  2. Gather the information you need for the device type.
  3. Review the best practices for device templates.
  4. If you are creating a device template for an F5 device, review F5 device template behavior.

Create a device template using the interactive wizard

  1. Click Settings > All Settings.
  2. Under Node & Group Management, click Manage Device Templates.

  3. Perform one of the following actions:
    • To create a new device template based on an existing template, complete the following steps.

      1. Find an existing template that is similar to the one you need.
      2. Select the existing device template and click Copy.

        You must copy and rename SolarWinds-provided templates because they are not editable. SolarWinds recommends copying and renaming any template that you are using as the basis for a new template because the existing template might be applied to nodes.

      3. Give the template a unique name and click Save.
      4. Select the new template and click Edit > Using Interactive Wizard.
    • To create a new device template from scratch, click Add New > Using Interactive Wizard.

  4. Select a node to test the operations against. (Use the Level and Group By lists to organize the node list.) Click Next.

  5. Choose the scope of operations for this device template:

    • Execute scripts only: Requires a valid connection profile. The device template must define the commands to turn off paging and show the version. If the device uses unrecognized prompts, these must be specified.

    • Execute scripts and download config from the device: The device template must define the commands to download the config and to specify each type of config. If the device requires an additional password to access higher privileges, the connection profile must include that password.

    • Execute scripts, download config from the device, and upload config to the device: The device template must define the commands to enter config mode, upload the config, and exit config mode.

    Then click Next.

    The Connection Profile section displays the connection profile for the selected device. The connection profile specifies the what credentials NCM uses to log in to the device and what protocols are used to transfer configs and execute scripts.

  6. If the connection profile needs to be updated, make the required changes.
  7. In the Device Template section:
    1. In the Reset Terminal Size Command field, enter the command to turn off paging for the device.

      For more information about all available NCM device template commands, see NCM device template commands. For information about entering commands, see How to specify CLI commands and keystrokes.

    2. In the Show Version Command, enter the command to display the software version.
    3. If either of the following are true, click Show advanced options:
      • The device uses nonstandard prompts that NCM does not detect by default.
      • The command to provide a higher level of access is something other than enable.

      For each non-standard prompt or command, click Custom and enter value that NCM should use when communicating with the device.

    4. Click Test to verify that Connection Profile and Device Template settings work against the node you selected.

      The test logs in to the device, executes the Reset and Show Version commands, and exits the session.

    5. After a successful test, click Next.

      If the scope includes downloading configs, the Config Download panel is displayed. If not, continue with step 11.

  8. On the Config Download panel:

    1. Enter the command to download the config using the transfer protocol specified in the device template.
    2. Enter the commands used by this device to identify each config type.

      The Config Types section lists all default and custom config types associated with the selected device type. If the device does not use standard config types, you can enable a custom config type.

    3. Set the config type to use in the download test, and click Perform Download Test.

    4. After a successful test, click Next.

      If the scope includes downloading configs, the Config Upload panel is displayed. If not, continue with step 10.

  9. On the Config Upload panel:
    1. Enter the commands to enter and exit config mode, write to memory, and reboot the device.
    2. Enter the command to upload the config using the transfer protocol specified in the device template.
    3. Click Next.
  10. On the Save Device Template Panel:
    1. In the Save Device Template field, specify a name to identify this device template.

      In most cases, the name includes the vendor and the device type. If you created a copy of a default NCM device template, add something to make the name unique, such as your organization's name. The name should be meaningful to NCM administrators.

    2. Enter a system OID that identifies the device types that can use this device template. See About specifying the system OID for more information.

    3. Specify whether this template can be automatically assigned to devices:
      • If you to not want the template to be automatically assigned, select No from the Use for auto-detect drop-down menu.

      • If you want the template to be automatically assigned, select Yes from the Use for auto-detect drop-down menu. Then specify whether to use the system OID or the description for automatic assignment.

    4. If you want to manually assign this template to devices, select the devices in the Assign Device Template section. You can also choose to assign the same connection profile to the selected devices and download configs.

      By default, the template is manually assigned to the device you chose to test the template against. If you do not want to manually assign the template to that device, click Remove above the device list.

  11. Click Finish to save the device template.

If both this template and another template are available for automatic assignment and target the same devices, disable automatic detection on one of the templates. For example, if you copied a default template to customize it and both the default template and the custom template specify the same system OID, be sure to disable automatic detection on the default template.

Create a device command template using the XML editor

  1. Click Settings > All Settings.
  2. Under Node & Group Management, click Manage Device Templates.
  3. Perform one of the following actions:
    • To create a new device template based on an existing template, complete the following steps.

      1. Find an existing template that is similar to the one you need.
      2. Select the existing device template and click Copy.

        You must copy and rename SolarWinds-provided templates because they are not editable. SolarWinds recommends copying and renaming any template that you are using as the basis for a new template because the existing template might be applied to nodes.

      3. Give the template a unique name and click Save.
      4. Select the new template and click Edit > Using XML Editor.
    • To create a new device template from scratch, click Add New > Using XML Editor.

  4. Edit the Value of any command, or add other commands.

    For more information about all available NCM device template commands, see NCM device template commands. For information about entering commands, see How to specify CLI commands and keystrokes.

  5. Specify the template name, system OID, and whether this template can be automatically assigned to devices. For more information about these fields, see step 10 in the previous section.
  6. Click Save.

Login credentials for menu-based devices

For menu-based devices, the login user name and password must be sent as pre-command values instead of from the connection profile. To do this:

  1. Edit the device's connection profile:
    1. Clear the Username and Password fields.
    2. Set Enable to <No Enable Login>.
  2. Enter the following pre-commands in the device template:

    <Command Name=”PreCommand” Value="username${DownArrow}”/>

    <Command Name=”PreCommand” Value="password${ENTER}”/>

How to specify CLI commands and keystrokes

For some device template commands, you must specify the CLI commands and keystrokes that are executed on the device when that device template command is called. For example, the device template command to write to memory might have the value write memory.

In addition to strings, device template commands can include the following elements:

  • Keystroke macros, such as ${CRLF} which can simulate pressing Enter between commands: 

    reload${CRLF}Yes

  • Node macros, such as ${StorageAddress}, which supply information stored for a specific node:

    copy ${TransferProtocol}://${StorageAddress}/${StorageFilename} ${ConfigType}

  • Transfer macros, such as ${ConfigText}, which used in commands to upload or download a config:

    ${ConfigText}${CRLF}exit${CRLF}y"

  • Date and time macros, which can be used with commands such as RebootAt to specify a reboot at a specific date and time:

    reload at ${HH}:${NN}${CRLF}Yes

  • Command macros, which are other device template commands formatted as macros. For example, the following device template command runs the commands specified for EnterConfigMode and for ExitConfigMode:

    ${EnterConfigMode}${CRLF}${ConfigText}${CRLF}${ExitConfigMode}

In the XML editor, CLI commands are entered as the Value of the command. For example:

<Command Name="DownloadConfig" Value="Show ${ConfigType}" />

In the wizard, CLI commands are entered in the text box (without quotes):

About specifying the system OID

If the device template can be used by multiple device types, remove enough numbers from the end of the system OID to match all device types that should use the template, but leave in enough numbers exclude device types that should not use it.

You can set up cascading templates by creating a series that targets slightly different OIDs. For example:

  • 1.3.6.1.4.1.9 = Cisco (All)
  • 1.3.6.1.4.1.9.1.23 = Cisco 2507

You can specify a specific device with a more exact OID, and NCM will try to find the closest match. In this example, if NCM is communicating with a device with a system OID of 1.3.6.1.4.1.9.1.25, it uses the Cisco (All) template, but if the system OID is 1.3.6.1.4.1.9.1.23, it uses the Cisco 2507 template.

In some cases, removing enough numbers to include all desired device types also includes device types that should not use the template. If so, you can use the system description for automatic assignment or you can manually assign the template to devices.

Edit a custom device template

You can edit custom templates, but you cannot edit the default templates shipped with NCM. To change a default device template, make a copy of the template and create a new device template based on the copy.

  1. Click Settings > All Settings.
  2. Under Node & Group Management, click Manage Device Templates.
  3. Select a custom device template.
  4. Click Edit and select either Using Interactive Wizard or Using XML Editor.
  5. Edit values, and click Finish (in the wizard) or Save (in the XML editor).

Confirm the device template is working

  1. Click My Dashboards > Network Configuration > Config Summary.
  2. Under NCM Node List, click a node to which you assigned the device template.
  3. On the node details page, click Configs on the left.
  4. Under Download Config, select a config type.
  5. Click Download.
  6. If the downloads succeeds, the device template is working as expected.

Delete a custom device template

You can delete only custom device templates.

  1. Click Settings > All Settings.
  2. Under Node & Group Management, click Manage Device Templates.
  3. Select one or more custom device templates.
  4. Click Delete and click Yes at the confirmation prompt.

    If you select one of the default templates shipped with NCM, the Delete button is not available.