Submit a ticketCall us

WebinarWebinar: A checklist for planning your Network Performance Monitor (NPM) upgrade

Are you ready for your next upgrade? To help you plan smoothly, join this webcast to learn more about, SolarWinds® Orion® Installer, SolarWinds Upgrade Advisor, Upgrades Guides, Training Videos, and other resources available. We’ll share key upgrade planning considerations, lessons learned from customers with practical advice from SolarWinds Product Experts. We’ll also give practical tips to identify the estimated time needed and resources, how to prepare the business and IT staff for changes, ways to plan for required system changes, and more.

Register now.

Home > Success Center > Network Configuration Manager (NCM) > NCM Documentation > NCM 7.9 Administrator Guide > Command template commands and variables

Command template commands and variables

Created by Caroline Juszczak, last modified by Anthony.Rinaldi_ret on Oct 03, 2016

Views: 1,383 Votes: 0 Revisions: 4

Updated: December 4, 2018

The following commands are used to modify and declare the behavior of device templates in SolarWinds NCM. One or more attributes can be specified for each command.

Command attributes

The following attributes are available for each command in a device template.

Attribute Description
Name 

The command name recognized by NCM, which indicates the action to be performed on the device. Available command names are listed in the following section.

Value

The actual commands to be issued on the device. For example:

<Command Name="Reboot" Value="request restart system${CRLF}y"/>

ConfigType

The config type (Running, Startup, Device Type, or a custom type). Include this attribute if different commands are issued for the same action depending on the config type. For example, Palo Alto devices can have a different DownloadConfigIndirectSCP command for each device type:

<Command Name="DownloadConfigIndirectSCP" ConfigType="Running" Value="${TransferProtocol} export configuration from running-config.xml to ${SCPServerUserName}@${SCPStorageAddress}:/${StorageFilename}${CRLF}yes${CRLF} ${SCPServerPassword}"/>

<Command Name="DownloadConfigIndirectSCP" ConfigType="Device State" Value="${EnterConfigMode}${CRLF}save device-state${CRLF}exit${CRLF}${TransferProtocol} export device-state to ${SCPServerUserName}@${SCPStorageAddress}:/${StorageFilename}${CRLF}yes${CRLF}${SCPServerPassword} Regex="\[edit\]" "/>

If a device template contains multiple commands with the same name and the same config type, NCM uses the value for the first command listed. For example, if a device template contained the following entries, NCM would use the value 1:

<Command Name="MyCommand" ConfigType="MyConfigType" Value="1"/>
<Command Name="MyCommand" ConfigType="MyConfigType" Value="2"/>

If a command does not specify a config type, it is the default command used for all config types not explicitly specified. For example, if a device template contained the following entries, NCM would use the value 3 for Running and Startup configs:

<Command Name="MyCommand" ConfigType="MyConfigType1" Value="1"/>
<Command Name="MyCommand" ConfigType="MyConfigType2" Value="2"/>
<Command Name="MyCommand" Value="3"/>
Format

Specifies that a config type is downloaded in XML format:

<Command Name="Running" Value="running" Format="XML" />

Commands

These commands modify the interaction between SolarWinds NCM and your network devices. Ensure you fully understand what modifications will do before modifying a device in production using these commands.

Command Name

Description

ConfigStartsFromRegex

Allows you to exclude echo and specify the start of the configuration. For example:

<Command Name="ConfigStartsFromRegex" Value="&lt;\S+&gt;" />

If a device template include the command above and a device returns the following:

echo 1
echo 2
<Config>
...
</Config>

NCM saves this as the configuration:

<Config>
...
</Config>

CustomPasswordPrompt

Allows you to specify the password prompt issued by a device in case NCM is having trouble recognizing the device's prompt (for example, due to unsupported characters).

DownloadConfig

Series of commands used to download a configuration from a device.

DownloadConfigIndirect

Series of commands used to download a configuration indirectly from a device using TFTP.

DownloadConfigIndirectSCP Series of commands used to download a configuration indirectly from a device using SCP.

EnableCommand

Allows you to declare a custom enable command for those devices that do not use Enable as the command.

EnableIdentifier

Only used when a device does not return the # character at the end of a prompt to indicate enable mode. Declare the value displayed while in enable mode for a device.

EnterCLI

Specifies the commands to send upon receiving the VirtualPrompt command to enter the CLI mode of the menu driven device. Use pre-command variables to declare the command values. For more information, see Pre-command and command template variables and examples.

EnterConfigMode

Series of commands used to enter the configuration mode of a device.

ExitConfigMode

Series of commands used to exit the configuration mode of a device.

IPAddress

The IP address of the server where SolarWinds NCM is installed.

MenuBased

Specifies whether the device is menu- or CLI-based. If a device is menu-based and you can switch it to CLI from the menu, use the VirtualPrompt and EnterCLI commands to do so. Valid values are true or false.

MenuDrivenConfigStart

Allows you to declare a value after which the transmitted data is considered the config, requested from the menu-driven device. For example, in the Cisco VPN Concentrator device template, the declared value is ##########. The information sent after the ten hash signs is saved as the requested configuration file.

More

Specifies the More prompt in the rare instance that this prompt is not recognized automatically. Do not specify this command unless you are experiencing issues with paging.

Precommand

Specifies the device requires a pre-command. For more information, see Pre-command and command template variables and examples.

Reboot

Series of commands used to reboot the device.

RebootAt

Series of commands used to reboot a device at a specified time. Use the variables listed in the Configuration archive variables section to assign the date and time.

RESET

Series of commands used to set the length and pagination of the session.

Running

Value used to specify a running configuration type.

SaveConfig

Series of commands used to write the configuration to the devices memory.

Startup

Value used to specify a startup configuration type.

UploadConfig

Series of commands used to upload a configuration to a device

UploadConfigIndirect

Series of commands used to upload a configuration indirectly to a device using TFTP.

UploadConfigIndirectSCP Series of commands used to upload a configuration indirectly to a device using SCP.

Version

Series of commands used to display the software version of the device.

VirtualEnablePrompt

Allows you to specify a regular expression and search for the defined value in the entirety of a device response. This command is often used with menu-based devices, allowing you to locate a specific phrase returned by the device. When specified, ensure you also declare the MenuBased command as true or false.

VirtualPrompt

Specifies the command prompt that will be sent when the device is ready for command input. Use this command along with the MenuBased command to specify the exact prompt SolarWinds NCM should wait to receive before sending commands.

 

Last modified

Tags

Classifications

Public