DX NetOps Manager

hp_procurve_capture_config.txt 

06-11-2011 12:13 AM

NCM script to capture config from HP switches using SSH. We had some issues with NCM hanging on certain devices, so we have some built in workarounds. Not the best way since it won't log the device as failed, but at least the NCM task will finish this way. You will need Net::SSH2, Net::SSH2::SFTP and Time::HiRes for this script to work.

Statistics
0 Favorited
8 Views
1 Files
0 Shares
4 Downloads
Attachment(s)
txt file
hp_procurve_capture_config.txt   2K   1 version
Uploaded - 05-29-2019

Tags and Keywords

Comments

09-04-2014 03:46 AM

The startup or running config is determined by setting the scp_file parameter in your NCM config. For the startup config it would look like this:

At some point HP introduced the ip ssh filetransfer feature on their Procurve switches. With this feature you can use SCP/SFTP to fetch a config, and that is what this script does.

On the command line it would look something like this:

scp myswitch:/cfg/startup-config myswitch.conf

 

What the script does is fetch the file configured in scp_file using sftp and then send it to NCM, If your switches fail because you require an enable password to that (you will probably get the message "Can not open subsystem SFTP"), you should slightly modify the script to send the enable command with the password stored in $pw_enale before the sftp session is opened. But as far as I know that is not required if you're fetching a config.

09-03-2014 10:42 AM

How do you ask for the startup and running configurations?  I don't see any difference in the script.

 

also, my Procurve devices require a password for the enable command.  Does the scp process bypass this requirement somehow?

Related Entries and Links

No Related Resource entered.