Network Management

NCM Device Command Templates

What is a Device Command Template? Different devices use different command to execute the same actions. A device command template essentially provides a map for NCM to tell which commands should be used for each device type. Customers can create or modify their device command templates in order to add support for their devices.

First published date

11/27/2018 5:48 PM

Last published date

11/27/2018 5:48 PM

Overview

Different devices use different command to execute the same actions. A device command template essentially provides a map for NCM to tell which commands should be used for each device type.

Product section

Network Configuration Manager

Resolution

Does Support edit Device Command Templates? 

Technically no; however, best effort can be provided with writing or editing a device command templates. If there is no specific template:

  • Check on the Content Exchange on THWACK for existing device command templates, as it may have been created already
  • Create a device template in NCM. See the NCM Administrator Guide  for details. 
  • You can also submit a feature request for the new template for that device to be created.
    Note: This may require you to provide a significant amount of information (i.e. sysObjectID, relevant commands, etc.) and the request does not guarantee that template will be created.

How does NCM tell which Device Command Template should be used? 

NCM polls the device System OID via SNMP.

The Device Command Templates are stored with the Device Model, and either a partial or full SystemOID in the filename:

To choose a device command template, NCM must find the closest matching Device Command Template, using the SystemOID.

Example Before NCM 7.4:

For NCM 7.4 and above the System OID can be found in the Node details in Orion. (NCM 7.0-NCM 7.3 may be in both the Web and the currently removed Win 32 client above)

This device's System OID is 1.3.6.1.4.1.9.1.516. From the list above, none of the device command templates match this OID exactly. However, the 'default' Cisco IOS device command template uses a partial SystemOID: 1.3.6.1.4.1.9. so this will match the device System OID the closest, and will be used as the device command template.

What Information do you see in a Device Command Template? 

To access device templates follow steps below (NCM 7.7 and later):

  1. From the Orion Web Console, go to Settings > All Settings
  2. Under Node & Group Management > Manage Device Templates.
  3. Click Generic and select Edit using the XML editor.

To access device templates follow steps below (NCM 7.4 to NCM 7.6):

  1. Log in to the Orion Web Console.
  2. Go to Settings.
  3. Go to NCM Settings.
  4. Go to Device Templates (in Advanced section).

To access device templates follow steps below (NCM 7.3.2 and older):

  1. Log in to the Orion server.
  2. Go to below (default) folder:

    C:\Program Files (x86)\SolarWinds\Orion\NCM\DeviceTypes\

Below are some example actions and commands you may see in a device command template. The NCM Admin Guide covers the available variables more thoroughly.

ACTIONXML NAMEEXAMPLE COMMAND (THE XML NAME CAN BE USED AS A MACRO IN OTHER COMMANDS)
Disable paginationRESET

terminal width 0

terminal length 0

Reboot the deviceRebootreload noconfirm
Change to configuration modeEnterConfigModeconfig terminal
Exit from config modeExitConfigModequit
Specify the startup configurationStartupstartup
Specify the running configurationRunningrunning
Display a configuration on the terminal / telnet sessionDownloadConfig

show run

show start

show ${ConfigType}

Upload a configuration via telnet / sshUploadConfig${EnterConfigMode}${CRLF}${ConfigText}${CRLF}${ExitConfigMode}.
Download a configuration using TFTPDownloadConfigIndirect

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

Erase a configEraseConfigwrite erase
Save a config to memorySaveConfig 

 Example Device Command Template - Standard Cisco IOS Device Command Template

01	<Configuration-Management Device="Cisco Devices" SystemOID=" 1.3.6.1.4.1.9">
02	<Commands>
03	<Command Name="RESET" Value="terminal width 0${CRLF}terminal length 0"/>
04	<Command Name="Reboot" Value="reload${CRLF}y${CRLF}y"/>
05	<Command Name="EnterConfigMode" Value="config terminal"/>
06	<Command Name="ExitConfigMode" Value="end"/>
07	<Command Name="Startup" Value="startup"/>
08	<Command Name="Running" Value="running"/>
09	<Command Name="DownloadConfig" Value="Show ${ConfigType}"/>
10	<Command Name="UploadConfig"Value="${EnterConfigMode}${CRLF}${ConfigText}${CRLF}${ExitConfigMode}"/>
11	<Command Name="DownloadConfigIndirect" Value="copy ${ConfigType} ${TransferProtocol}://${StorageAddress}/${StorageFilename}${CRLF}${CRLF}${CRLF}"/>
12	<Command Name="UploadConfigIndirect" Value="copy ${TransferProtocol}://${StorageAddress}/${StorageFilename} ${ConfigType}${CRLF}${CRLF}"/>
13	<Command Name="DownloadConfigIndirectSCP" Value="copy ${ConfigType} ${TransferProtocol}://${SCPServerUserName}@${SCPStorageAddress}/${StorageFilename}${CRLF}${CRLF}${CRLF}${CRLF}${SCPServerPassword}"/>
14	<Command Name="UploadConfigIndirectSCP" Value="copy ${TransferProtocol}://${SCPServerUserName}@${SCPStorageAddress}/${StorageFilename} ${ConfigType}${CRLF}${CRLF}${SCPServerPassword}"/>
15	<Command Name="EraseConfig" Value="write erase${CRLF}Y"/>
16	<Command Name="SaveConfig" Value="write memory"/>
17	<Command Name="Version" Value="show version"/>
18	</Commands>
19	</Configuration-Management>

Device Communication Process