Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Import Devices NetView -> CW2K help

Import Devices NetView -> CW2K help

Import Devices NetView -> CW2K help

I am a n00b with CiscoWorks 2000 but have been tasked with taking over the CW2K administration for our company (the old administrator left before I was hired).

We currently have an automated process set up to add new devices to our CW2K database that involves exporting a device list from NetView and importing that device list into CiscoWorks using the "checkaddr.pl" and the "crmimport.pl" scripts.

The import itself works flawlessly, however any new devices that are added to CiscoWorks do not have their telnet/enable passwords defined in the database and will not archive until these passwords are manually set.

Currently we are going through manually and setting these passwords via RME->Administration->Inventory->ChangeDeviceAttributes. This is a tedious process and we are looking for a way to make this easier. It would be great if we could set default passwords for any new devices that are added as they will all be the same. It also looks like I might be able to create some sort of template but I have come up empty handed on this as well.

We're about to add 5,000 new devices so.... I have written my own Perl script that allows me to query the database directly but I can't quite figure out exactly how the passwords are stored, and I don't really want to do it this way anyway as it appears Cisco frowns upon direct database manipulation and would not support it.

If anyone could give me a pointer or two I would certainly appreciate it. Any other n00b CW2K administrator documentation that you can point me to would be very helpful as well.

RE: Import Devices NetView -> CW2K help

First method that works is to export the RME data as CSV format.  Open the file in Excel. Populate the missing fields.  Import the file back into CW2000.  Use Imported information, rather then managed.

Second method is to take the data from NetView via a script. (ovtopodump -o |grep and ovtopodump -o |grep
Create a CSV formatted file with the proper header for importing into CW2000.  If the network uses various community strings, this becomes more complex then the first method.

RE: Import Devices NetView -> CW2K help

Thanks for all the suggestions. The issue was to find an automated way of doing this. I could take the CSV file that was exported from NetView and add the appropriate password information via a script except there appears to be no supported method of import that will accept these extra fields short of point&click in the CW interface which certainly isn't an automated solution.

It's turning out to not be all that big of a deal to this point but it would certainly be better if there were an automated way. In fact what I really would like to be able to do is set the TACACS ID and Password for a given device name from the command line (I'm not a point & clicker).

I have written a command line query in Perl to give me a list of devices in the CW database that are erroring because of invalid/nonexistent TACACs IDs. If I could just feed that list to a script that would set the ID/Passwd for a given device it would be golden.

I imagine something like this:

for dev in `getbadpasswords.pl`
  /opt/CSCOpx/bin/chdev.pl -DEV $dev -TID tacacsuser -TPW tacacspwd

But that would be too easy.

Thanks again!

RE: Import Devices NetView -> CW2K help

Update: I finally have this fully automated. I had mentioned that we were using "crmimport.pl" to do a nightly import of a seed file from our NetView system. I mistakenly assumed that crmimport.pl could only handle the CSV fields "devname,ROstr,RWstr" because that is all we pass in our seed file. After some testing I realized that crmimport.pl can handle all the fields that DataPrep.pl and the other utility can handle (19 fields).

I had this one step from being fully automated by writing a process that was run from cron every morning at 6:30 and queried the database for failed archive messages pertaining to no passwords in the database. It then generated a CSV import file from that list and placed it in a directory where it could be imported using the web interface. Once I realized the "crmimport.pl" could do the same thing that the web interface import does I just added it to the script that generates the CSV file and it is now fully automated.

Sure it probably would have been better to just determine which devices are new in the seed file and add the passwords to it and I just may modify the process to work like that in the future but for now it's working well enough. On a side note, the utility I wrote to generate the CSV file from search criteria works very well. It's been a great debugging tool as well. Here are the options:

$ getpwd -h

Usage: getpwd [OPTION]...

Search Options:
  -a,   --all                   Show entire database
  -c|t, --[cfg]type=CFGTYPE     Can be [Rr]un, or [Ss]tart
  -d,   --device=DEVSTR         Device name (or partial device name)
  -e,   --errors                Show only devices with errors
        --errorstr=ERRSTR       Show only devices with errors matching ERRSTR
  -f,   --fullerrors            Show full error messages
  -i,   --importformat          Output in CSV format ready for CW import
  -n,   --nohead                No page heading
  -r,   --rows=NUMROWS          Rows per page (0 = no header)
  -u,   --uniqhosts             Show unique hostnames only
  -h,   --help                  Print this help

I have also written a Perl/Tk GUI wrapper for the above script. The script queries the RME database directly and displays device and password information (passwords are not encrypted in the database surprisingly).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close