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

Use Solarwinds to Track CMD History on Cisco Devices

Jump to solution

Hello Thwack,

     My customer recently tasked me with the tracking and storage of configuration changes within the network. New this information can be seen in a switch through the use of the sh history all command producing something that looks like the following.

CMD: 'sh history all ' 13:26:58 EST Wed Jun 15 2016

I was hoping to determine a method of exporting this to SolarWinds possible within the switch logs for storage over a timeframe. Any suggestions would be appreciated.

Thank You

1 Solution

scottyplo

Go to the NCM settings, and then "Device Templates" under the "Advanced" section.

Then, select the device template being used by the devices you want to log the history on, and click the "Edit" button, and choose the XML editor.

Copy the "Running" config, and paste it on the line below.

Change the name of the new line to History, and then change the value to the command you need to run. (minus the "show" part)

ncm_device_template-001b.png

So, using your example, you should have something like this:

<Command Name="Startup" Value="start"/>

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

<Command Name="History" Value="history all"/>

<Command Name="DownloadConfig" Value="show ${ConfigType}"/>

Save that, and go back to your NCM settings.

Now, you need to add the newly created "History" config type to be downloaded.

From the NCM settings page, click the "Configs" link within the "Configs" section.

Next, you simply need to add the new config type to the list.

Also, you may want to make sure your "minimum length" of a saved config will be enough to save the results of the history command.

ncm_config_settings_config_types-001b.png

You should now be able to go to a device, and manually download the newly created "History" config type.

Test it out, and if it works, then all you need to do is create a new NCM job, and have it backup the History config type for the devices you need.

ncm_download_config-001.png

ncm_config_details_history-001.PNG

Now you should be able to archive your cmd history just the same as you do your device configs.

I hope this helps. Let us know.

Thank you,

-Will

View solution in original post

2 Replies

scottyplo​ You could probably just add that command into the device template, and then add it as a config type to be downloaded. Maybe setup a job to download the history every xx hours or days... Would that work for you?

scottyplo

Go to the NCM settings, and then "Device Templates" under the "Advanced" section.

Then, select the device template being used by the devices you want to log the history on, and click the "Edit" button, and choose the XML editor.

Copy the "Running" config, and paste it on the line below.

Change the name of the new line to History, and then change the value to the command you need to run. (minus the "show" part)

ncm_device_template-001b.png

So, using your example, you should have something like this:

<Command Name="Startup" Value="start"/>

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

<Command Name="History" Value="history all"/>

<Command Name="DownloadConfig" Value="show ${ConfigType}"/>

Save that, and go back to your NCM settings.

Now, you need to add the newly created "History" config type to be downloaded.

From the NCM settings page, click the "Configs" link within the "Configs" section.

Next, you simply need to add the new config type to the list.

Also, you may want to make sure your "minimum length" of a saved config will be enough to save the results of the history command.

ncm_config_settings_config_types-001b.png

You should now be able to go to a device, and manually download the newly created "History" config type.

Test it out, and if it works, then all you need to do is create a new NCM job, and have it backup the History config type for the devices you need.

ncm_download_config-001.png

ncm_config_details_history-001.PNG

Now you should be able to archive your cmd history just the same as you do your device configs.

I hope this helps. Let us know.

Thank you,

-Will

View solution in original post