View Single Post
Old 05-15-2013, 01:27 PM
gunslingor gunslingor is offline
Registered User
Join Date: May 2013
Posts: 27
There's not a scripting object for the Connect window, so you won't be able to interact with the Connect dialog via the script.
-oh well, I suspect I can make my own at a later date... for now I'm just going to connect and run it.

You're also asking about the Connect window (which implies you have a Session).
-I might be using the wrong terminology. I have a bunch files that the boss man gave me to interface with these devices... I installed CRT and pointed the path to these files... now most of our devices show up in the connect window for easy access. To me, I'd call these 'session config files' and not 'sessions'... right? I mean, a session isn't established until you connect.

I'm not sure that my picture is complete
Here it is since your being so helpful:
We have roughly 300 networking devices I now have security responsibility for. The company... well, lets just say security/compliance/documentation hasn't been the highest concern for the last 20 years... but now we could be fined due to new compliance requirements and that's why they hired me =).

So, first and foremost I need an accurate accounting of all devices my department owns... so I made a quick Access DB which house basic PHYSICAL data (e.g. rack, row, room, mfr, model, device type, description and a lot more); the intent being I plan to go around to all our cabinets and take a tally of all the networking device, which will give an accurate count. However, all the good/bad documentation done by different departments and people up until now references devices using a huge swath of variation. I mean, currently the most accurate tally is the boss man's secureCRT sessions, which some times uses host or IP name.... but this doesn't match up with the physical data I'm gathering.... which is the primary reason this scripting task began, to make my physical data match the various forms of cyber data people have been using to track stuff over the years. So if one report from 10 years back references devices using either IP, MAC, serial number, special other tags, hostname, rack/row (mine), etc... that my DB will house all the data needed to identify the device being referred to, without a ton of research.

Wow, sorry, I gotta stop rambling.

Anyway, I'm doing this ONCE around walk down and because of the need to match up the physical with the cyber data, I figure it best to grab some of this cyber data while I'm gathering the physical data. I mean, the boss man uses all these secure crt sessions to manage the network... but he really doesn't know physically where a lot of these are. Initially I was just going to copy past into the db from secureCRT, but this is too slow to gather interface data (on say a 48 port switch.... it would take like 4 hours). So, I'm currently getting my feet wet in scripting to gather and parse the data (I've done this before a ton, but only for hosts and clients and it always ran locally). Minimal data needed: interface data (with the fields specified in a previous post), OS version as spit out with show version, image file name, and I think that's about it for now, though I may grab more as I get better with this development environment and cisco commands.

I think you mentioned elsewhere that you would need to modify commands for each machine, so you wanted individual scripts for each machine. That didn't make a lot of sense to me, and I see it as a critical point. Depending on that one point, you may or may not be able to use the example script that has worked so well for so many network engineers:Read Data From Separate Hosts/Commands File And Log To Individual Files.
To clarify, in the end, I suspect I'll have 5 or 6 scripts that are virtually identical. I mean, on a cisco FW you type "show interface brief" whereas on a cisco switch you type "show ip interface brief". I know I can probably pull the model number out of the show run and determine which command to run that way, but... I'm still getting my feet wet =). Also, this could end up being a temporary script and not something that will be used but once... not sure yet though.

Last edited by gunslingor; 05-15-2013 at 01:32 PM.
Reply With Quote