I am looking at solarwinds pushing a Kron scheduler to all cisco switches within my origanization. This is an automated backup to a ftp server and initiates a write mem. I am having issues passing the device name into the cli. Here is the code below, please provide suggestions. I am a little inexperienced using NCM in this fashion to push this configuration
.CHANGE_TEMPLATE_DESCRIPTION
This template configures physical interfaces based on interface description. It was verified on a Cisco 3850 Catalyst Switch running IOS software version 16.3.7.
.CHANGE_TEMPLATE_TAGS
Cisco, interface, VLAN, description, properties
.PARAMETER_LABEL @ContextNode
NCM Node
.PARAMETER_DESCRIPTION @ContextNode
The node the template will operate on. All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.
*/
script configure_SZ_Kron_Backups (
NCM.Nodes @ContextNode)
{
CLI
{
configure terminal
kron occurrence SaveConfigSchedule at 20:00 recurring
policy-list SaveConfig
!
kron occurrence WeeklyBackupConfigSchedule at 20:00 Fri recurring
policy-list WeeklyBackupConfig
!
kron occurrence MonthlyBackupConfigSchedule at 0:00 1 recurring
policy-list MonthlyBackupConfig
!
kron policy-list SaveConfig
cli write mem
!
kron policy-list WeeklyBackupConfig
cli show start | redirect xxx.xxx.xxx.xxx/.../[SysName]
!
kron policy-list MonthlyBackupConfig
cli show start | redirect xxx.xxx.xxx.xxx/.../[SysName]
}
}