cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 10

Looking for list of NCM variables

Jump to solution

I'm looking for a complete list of built-in variables that I could use in NCM scripts or change templates.

Specifically, I'm trying to mass change the hostname and domain of Cisco devices based on the Node Name in Solarwinds database. We recently adopted a new naming convention, so we re-named the devices in NPM / NCM hoping to automate the process of renaming the devices itself.

I want to run a script that would look something like this:

conf t

hostname ${NodeName}

ip domain-name ${NodeDomain}

exit

wri mem

But I can't seem to find the correct variables to use. I saw a list of NCM global variables listed in the Admin Guide, but didn't find what I was looking for. I was thinking of parsing out the domain and hostname out of the Solarwinds Node name.

Any help would be appreciated.

Tags (1)
1 Solution
Level 9

Was trying to find the variables and finally found some.

http://www.solarwinds.com/cirrusdocs/wwhelp/wwhimpl/js/html/wwhelp.htm?context=CirrusDocs&file=Cirru...

Search for variables and others will show up as well.  I can't find the complete list, but here are some.

Command Script Variables

Command script variables are used within command scripts, as well as within device command templates...Working with Command Scripts”.

Property

Description

ConfigType

Value used to specify the type of configuration

CR

Carriage return

CRLF

Carriage return - linefeed combination

DownloadConfig

Series of commands used to download a configuration from a device

EnableIdentifier

Only used when a device does not return the "#" symbol at the end of a prompt to indicate enable mod...

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 Cirrus Configuration Manager is installed

Precommand

Specifies the device requires a pre‑command. For more information and valid pre-command variables, s...Pre-Command Variables”.

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 of this 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

Version

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


Configuration Archive Variables

Cirrus Configuration Manager stores all downloaded configurations in a database. It can also store a...

Additional variables may also be used when specifying the configuration archive directory. Many of t...

Property

Description

DateTime

Local date and time in short date and local time format

Date

Date in short date format

LongDate

Date in long date format

MediumDate

Date in medium date format

Time

Time in short time format

LongTime

Time in long time format

MediumTime

Time in "medium time" format

ShortTime

Time in "short time" format

DOW

Day of the week (spelled out)

D

Day of the month

DD

Day of the month (with leading zero, if needed)

ABREVIATEDDOW

Day of the week in abbreviated format

LocalDow

Day of the week in the local language

Month

Number of the current month

M

Number of the current month

MM

Number of the current month (with leading zeros, if needed)

MMM

Abbreviated name of the month

MMMM

Name of the month

LocalMonthName

Name of the month in the local language

DAYOFYEAR

Day number of the year

YYYY

4 digit year

YY

2 digit year

YEAR2

2 digit year

YEAR4

4 digit year

H

Hour

HH

2 digit hour (with leading zero, if needed)

N

Minute

NN

2 digit minute (with leading zero, if needed)

S

Seconds

SS

2 digit seconds (with leading zero, if needed)

AMPM

AM or PM

CRLF

Carriage return - linefeed combination

ConfigType

Type of configuration ( running, startup, etc )

Caption

Caption of the node (NodeCaption)

Node Variables

All fields in the nodes table may be used as variables, including any custom properties added to you...

Nodes Table Field

Description

NodeID

Unique ID assigned to each Network Node

NodeCaption

Displayed name for the node. The default for NodeCaption is a variable. ${SysName}

NodeGroup

Group to which this node belongs. Some group examples includeRouters, Accounting, or simply ${Building}. The last example refers to a custom property named Building.

AgentIP

The IP address used when communicating with the node. A router or server may have many IP addresses....

AgentIPSort

Numeric equivalent of the AgentIP. Used for sorting by IP address in reports.

ReverseDNS

Reverse lookup of the AgentIP

ResponseTime

Current response time of the node in milliseconds

ResponseError

OK if the node is responding. Returns an error message if the node is not responding.

Status

Numeric status of the node.

1 = Up

2 = Down

Community

SNMP community string

SNMPLevel

The version of SNMP supported by the Node.

0 = SNMP not supported

1 = SNMP V1

2 = SNMP V2

3 = SNMP V3

SysName

System name of the node.

SysDescr

System description of the node.

SysContact

System contact information collected from the node.

SysLocation

System location information collected from the node.

SystemOID

System OID discovered from the node.

Vendor

Hardware vendor of this network node.

VendorIcon

Name of the vendor icon used.

MachineType

Type of hardware. This information is discovered by SolarWinds Discovery Engine.

LastBoot

Last time the node rebooted.

OSImage

Operating system running on the node

OSVersion

Version of the operating system running on the node

ConfigTypes

Types of configuration files supported by this node

NodeComments

Any comments about this node entered by the user.

NextDiscovery

Time for next complete discovery of this node

NextPoll

Time for next poll (up/down and response time)

Username

Login username

Password

Login password

EnableLevel

Enable level used when transferring configs or running scripts

EnablePassword

Enable level password

ExecProtocol

The protocol used when executing scripts. This is set to${GlobalExecProtocol} by default.

TransferProtocol

The protocol used when downloading configs. This is set to${GlobalTransferProtocol} by default.

View solution in original post

7 Replies
Level 9

Was trying to find the variables and finally found some.

http://www.solarwinds.com/cirrusdocs/wwhelp/wwhimpl/js/html/wwhelp.htm?context=CirrusDocs&file=Cirru...

Search for variables and others will show up as well.  I can't find the complete list, but here are some.

Command Script Variables

Command script variables are used within command scripts, as well as within device command templates...Working with Command Scripts”.

Property

Description

ConfigType

Value used to specify the type of configuration

CR

Carriage return

CRLF

Carriage return - linefeed combination

DownloadConfig

Series of commands used to download a configuration from a device

EnableIdentifier

Only used when a device does not return the "#" symbol at the end of a prompt to indicate enable mod...

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 Cirrus Configuration Manager is installed

Precommand

Specifies the device requires a pre‑command. For more information and valid pre-command variables, s...Pre-Command Variables”.

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 of this 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

Version

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


Configuration Archive Variables

Cirrus Configuration Manager stores all downloaded configurations in a database. It can also store a...

Additional variables may also be used when specifying the configuration archive directory. Many of t...

Property

Description

DateTime

Local date and time in short date and local time format

Date

Date in short date format

LongDate

Date in long date format

MediumDate

Date in medium date format

Time

Time in short time format

LongTime

Time in long time format

MediumTime

Time in "medium time" format

ShortTime

Time in "short time" format

DOW

Day of the week (spelled out)

D

Day of the month

DD

Day of the month (with leading zero, if needed)

ABREVIATEDDOW

Day of the week in abbreviated format

LocalDow

Day of the week in the local language

Month

Number of the current month

M

Number of the current month

MM

Number of the current month (with leading zeros, if needed)

MMM

Abbreviated name of the month

MMMM

Name of the month

LocalMonthName

Name of the month in the local language

DAYOFYEAR

Day number of the year

YYYY

4 digit year

YY

2 digit year

YEAR2

2 digit year

YEAR4

4 digit year

H

Hour

HH

2 digit hour (with leading zero, if needed)

N

Minute

NN

2 digit minute (with leading zero, if needed)

S

Seconds

SS

2 digit seconds (with leading zero, if needed)

AMPM

AM or PM

CRLF

Carriage return - linefeed combination

ConfigType

Type of configuration ( running, startup, etc )

Caption

Caption of the node (NodeCaption)

Node Variables

All fields in the nodes table may be used as variables, including any custom properties added to you...

Nodes Table Field

Description

NodeID

Unique ID assigned to each Network Node

NodeCaption

Displayed name for the node. The default for NodeCaption is a variable. ${SysName}

NodeGroup

Group to which this node belongs. Some group examples includeRouters, Accounting, or simply ${Building}. The last example refers to a custom property named Building.

AgentIP

The IP address used when communicating with the node. A router or server may have many IP addresses....

AgentIPSort

Numeric equivalent of the AgentIP. Used for sorting by IP address in reports.

ReverseDNS

Reverse lookup of the AgentIP

ResponseTime

Current response time of the node in milliseconds

ResponseError

OK if the node is responding. Returns an error message if the node is not responding.

Status

Numeric status of the node.

1 = Up

2 = Down

Community

SNMP community string

SNMPLevel

The version of SNMP supported by the Node.

0 = SNMP not supported

1 = SNMP V1

2 = SNMP V2

3 = SNMP V3

SysName

System name of the node.

SysDescr

System description of the node.

SysContact

System contact information collected from the node.

SysLocation

System location information collected from the node.

SystemOID

System OID discovered from the node.

Vendor

Hardware vendor of this network node.

VendorIcon

Name of the vendor icon used.

MachineType

Type of hardware. This information is discovered by SolarWinds Discovery Engine.

LastBoot

Last time the node rebooted.

OSImage

Operating system running on the node

OSVersion

Version of the operating system running on the node

ConfigTypes

Types of configuration files supported by this node

NodeComments

Any comments about this node entered by the user.

NextDiscovery

Time for next complete discovery of this node

NextPoll

Time for next poll (up/down and response time)

Username

Login username

Password

Login password

EnableLevel

Enable level used when transferring configs or running scripts

EnablePassword

Enable level password

ExecProtocol

The protocol used when executing scripts. This is set to${GlobalExecProtocol} by default.

TransferProtocol

The protocol used when downloading configs. This is set to${GlobalTransferProtocol} by default.

View solution in original post

Level 10

thanks for sharing this - that's exactly what I was looking for!

0 Kudos
Level 8

can you split variables, example

only first 5 letters of the NodeCaption, example in python would be ${NodeCaption[0:4]}

thanks

0 Kudos

I don't think you could split any variables perse. Though you could nest variables inside of other variables if you take a look at this: Node and configuration archive variables - SolarWinds Worldwide, LLC. Help and Support,​ perhaps that's of use.

Found this article very helpful. I've got production, and non-production nodes and I need to give file access to the non-production configs for various team members. Made it worlds easier to do this when I can simply give them inherited access to a single folder, as opposed to manually on each NCM group underneath.

So my archive location now looks like this: ${n_impact}\${NodeGroup}\${Caption}\${Date}\${Caption}-${ConfigType}.Config

Works great!

Level 13

Jenya,

 

It sounds like making a config change template would be a good option for you in this case. Have you explored that feature in NCM; there's a chapter devoted to it in the admin guide.

 

Doug

0 Kudos

Hi

did you have any sucess to do that

0 Kudos
Level 10

Unfortunately, no. I was hoping Thwack community would be more responsive

0 Kudos