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

Populate NCM script variables from downloaded running config

Populate NCM script variables from downloaded running config

If this feature already exists, please point me to some documentation to tells how to use it. I see where you can access and Custom Properties inside of scripts, and that is a great feature, it requires a lot of administration to go through and define those Custom Properties to use in scripts to make the scripts function over many like devices.

Example: On our DMVPN network for it to function correctly we must enter host routes for every spoke in the DMVPN network locally on the Cisco 819 used at the remote sites. Well, each 819 has a different gateway to the internet, so for ONE script to work across all 819's we have to define and populate a Customer Property for Default Gateway for the ISP. We can then make one script that updates all the 80-different remote 819 routers.

However, defining that Custom Property is a time-consuming process, especially when you consider the downloaded running config HAS all this information and is always up to date. Where Custom Properties, if we change the ISP and Default Gateway, we must make sure to update the Custom Property or you will disable that router on the next update.

Instead of Custom Properties, why not populate variables by pulling the information from the downloaded running config of the device? For example, each one of those remote routers has to have a entry "ip route 198.185.64.12 255.255.255.255 " followed by the ISP gateway address. (That’s the NHRI server for the DMVPN network.) Why can't NCM "cat" or parse the downloaded running config for that string and populate a script variable with the next text item after that search string. We would then have the ISP gateway unique for each one of the 819's and it could create script output that could be applied to each of the remote routers.

The best part, its feed by the latest downloaded running config, which makes it auto correcting for changes on the network.

For best functionality, it would be idea to have two-tiered search because of the way the configs output. IE. To populate a variable with the IP address of VLAN105, you would search for "interface vlan105" and sub search under that text indented for "ip address" and populate the variable with the next text string for the IP address.

I have done a lot of searching hoping to find this functionality already in NCM, but have found nothing. If it does exist, please point me in the right direction.

Tags (2)
2 Comments
Level 16

   too long

Community Manager
Community Manager
Status changed to: Open for Voting