Cisco – Solution for network inventory

ciscomanagement

I am trying to figure out a way to keep track of network equipment, including chassis and service modules/line cards. So when I need to find something, I know where I can find it.

1) telnet access available

2) IOS, IOS-XE, IOS-XR, NX-OS, ASA

I am wondering how feasible is it to use script to parse something like #show modules, #show diag in a large scale. Any better ideas? Yes they do have asset tags but they keep getting moved around and scanning the tags is way too much work to keep the information updated.

Btw SNMP is nice but it's probably not going to work in this environment. Connections and configs get changed on daily basis.

Best Answer

Something like RANCID might help you out here. Plus, if you don't do config management it would take care of that for you as well.

RANCID goes out and logs into all of your devices [launched via cron] grabs config/inventory, places it in a source control system and emails you config/inventory diffs. (This would catch any hardware moving around)

Using RANCID for inventory tracking isnt all that pretty though. I just grep what I am looking for from the config/inventory archive.

rancid@network configs$ grep XENPAK *
6509-1.stackexchange.com:!PID: XENPAK-10GB-SR
6509-1.stackexchange.com:!PID: XENPAK-10GB-SR
6509-1.stackexchange.com:!PID: XENPAK-10GB-LR
6509-1.stackexchange.com:!PID: XENPAK-10GB-SR
6509-1.stackexchange.com:!PID: XENPAK-10GB-SR
6509-1.stackexchange.com:!PID: XENPAK-10GB-SR
6509-1.stackexchange.com:!PID: XENPAK-10GB-LR
6509-1.stackexchange.com:!PID: XENPAK-10GB-SR
core-2.stackexchange.com:!PID: XENPAK-10GB-LR            VID: V02 , SN: XXXXXXXXXXX
core-2.stackexchange.com:!PID: XENPAK-10GB-LR            VID: V02 , SN: XXXXXXXXXXX
core-2.stackexchange.com:!PID: XENPAK-10GB-LR            VID: V02 , SN: XXXXXXXXXXX
core-2.stackexchange.com:!PID: XENPAK-10GB-LR            VID: V02 , SN: XXXXXXXXXXX
rancid@network configs$

Since this is all kept in a revision control system you can look back to see when a module was added or removed.