I am trying to use the Device.CLI.send.commands activity to initiate a TFTP backup from a custom device.
I would like to use the hostname to name the tftp upload file. Can someone point me to how to do this.
The current script is:
netsave text-config 192.168.24.64 %hostname%-%date%.cfg
but this is not doing the variable substitution.
A lot of this depends on how you setup the custom device. You need to check the info logs and determine where it is stopping in the process. If made a custom script for the device you are going to have to turn on the debugging log under File > Enable Capture Mode. This will create a log file in the debug folder that will help you to determine what's going on. Here is a link to the testing process with a custom device. If you still run into issues you are going to have to go into more depth on how you created your custom device.
Let me know if that helped at all.
I am trying to send a command to tftp a config file to a management server but have the destination filename be something related to the device.
netsave text-config 192.168.1.1 %hostname%-%date%.cfg
However this is saving a file with the name "%hostname%.%date%.cfg" on the TFTP server.
I am looking for the ability to pass the hostname and date as variables to the script so I can run this as a generic script for many devices. Otherwise I will need to write a custom script for each device.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process. Learn more today by joining now.