Document ID: 13483
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Checklist for Remote NMS Import
Troubleshooting Remote NMS Import
The DataPrep.pl Tool
Examples
Troubleshooting Local NMS Import
Importing Devices Into Your Network Inventory Using CSV and DIF Files
Comma-Separated Values (CSV) File
Device Integration File (DIF)
NetPro Discussion Forums - Featured Conversations
Related Information
Introduction
In the initial process of adding devices to the inventory, there can be issues that prevent a successful import. There are different types of inventory import that can be done:
-
Remote Network Management Systems (NMS) Import
-
Local NMS Import
-
Comma-Separated Values (CSV) and Device Integration File (DIF) file import
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
The information in this document is based on these software and hardware versions:
-
RME 2.x
-
RME 3.x
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Conventions
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
Checklist for Remote NMS Import
-
For RME 2.x—Table 2-3 in Installing Essentials shows the table of supported NMS applications for Remote Import along with their versions.
-
For RME 3.x—Table 1-6 in Installing Essentials for 3.x shows the table of supported NMS applications for Remote Import along with their versions.
For a successful remote inventory import, verify the following:
-
The TCP/IP connectivity to the remote Network Management System.
-
Your device read community strings are accurate.
-
Your local RME server has remote access to the remote username. You must be able to run the remote shell as the specified user on the remote host.
-
Both your local and remote machines are in your Name Resolution Service (such as Domain Name System (DNS) or Network Information Service (NIS)).
-
The remote NMS has the appropriate services and daemons loaded. This is different for each application.
-
The remote NMS is supported for Remote Import. The following are supported:
-
CiscoWorks for Switched Internetworks (CWSI) v2.x
-
HP Open View (HPOV)
-
Tivoli NetView (AIX remote host only)
-
CiscoWorks
-
Cisco WAN Manager (CWM)
Note: Windows NT/2000 is not supported on any platform application as a source for a remote import.
-
If you are using RME 3.0 - RME 3.2:
-
Check to see that user bin can log in to the UNIX Server. Use the following process to check login and directory permission:
On UNIX:
-
%su bin
-
%remsh host name -l remote login ls directory name
On Windows NT/2000 (must be logged on as user bin):
-
%SystemRoot%\system32\rsh.exe host name -l remote login Ls directory name
-
-
Verify that the remote server is configured as follows:
-
A .rhosts file is in the remote user's home directory and contains an entry for the RME server. The username entry should be bin.
-
The /etc/hosts.equiv file on the remote server does not contain any statements that disallow access by the RME server.
-
For CiscoWorks, the remote user is a member of the CiscoWorks group. On UNIX, the remote user ID is part of cscworks (or the group entered when CiscoWorks was installed) in /etc/group.
-
For CiscoWorks, the Sybase server is running on the remote host and the Sybase database uses the default query server name CW_SYBASE.
-
For CWSI 2.x, the remote user is a member of the group bin and a member of the CWSI "Known Network" database group. This database group must have write access to the "Known Network" database.
-
For HP Open View (HPOV), HPOV is running on the remote host.
-
For Tivoli NetView, Tivoli NetView is running on the remote host.
-
For Cisco WAN Manager, the default user name is svplus.
-
If you are using RME 3.3, 3.4, or 3.5, make sure that the remote server is configured as follows:
-
A .rhosts file is in the remote user's home directory and contains an entry for the RME server.
-
For the RME NT server, the username entry should be: hostnameSYSTEM, where hostname is the name of the RME NT server and SYSTEM is the user.
-
For the RME SOLARIS server, the username entry should be: hostnamecasuser, where hostname is the name of the RME SOLARIS server and casuser is the user.
-
The /etc/hosts. equiv file on the remote server does not contain any statements that disallow access by the RME server.
-
For CiscoWorks, the remote user is a member of the CiscoWorks group. On UNIX, the remote user ID is part of cscworks (or the group entered when CiscoWorks was installed) in /etc/group.
-
For CiscoWorks, the Sybase server is running on the remote host and the Sybase database uses the default query server name CW_SYBASE.
-
For CWSI, the remote user is a member of the group bin and a member of the CWSI "Known Network" database group. This database group must have write access to the "Known Network" database.
-
For HP OpenView, HP OpenView is running on the remote host.
-
For Tivoli NetView, Tivoli NetView is running on the remote host.
-
For Cisco WAN Manager, the default user name is svplus.
Troubleshooting Remote NMS Import
To troubleshoot a failed NMS import, try the tips described here.
Note: Words in angle brackets represent variables that you supply in a command statement, for example, <host name>. Enter the correct information for your system.
-
Verify that your device read community strings are accurate.
-
Increase the SNMP timeout values for devices.
-
Check the DPERR_* (error message) files in the Essentials directory for temporary files. On UNIX, this is the /tmp directory. On Windows NT, this is the install dir\Temp directory. The number at the end of the file name is the process ID. The file with the latest created date is probably the file that contains the error messages for your most recent import attempt.
-
On the RME navigation tree, select CiscoWorks2000 Server > Diagnostics > Collect Server Info. In the Collect Server Information dialog box, select the latest report and click Display (or, if necessary, create the report). Examine the resulting information for errors.
-
When importing from a local CiscoWorks database, verify that the CiscoWorks database query server is CW_SYBASE DSQUERY=CW_SYBASE).
Note: Make sure to add bin to the cscworks group in /etc/group before you start RME.
-
For a remote import, make sure you can access the correct remote directory using the remote shell.
-
Verify that only one RME web server is running as user root. This server should be the parent process for all of the other web servers. If you edited the /etc/group after RME was started:
-
Log in as su root.
-
Stop RME using one of the following commands, depending on your hardware platform:
-
Windows NT/2000 -> net stop crmdmgtd
-
Solaris -> /etc/init.d/dmgtd stop
-
HP-UX -> /sbin/init.d/dmgtd stop
-
AIX -> /etc/rc.dmgtd stop
-
-
Verify that no RME web server is running by entering:
ps -efa | grep web_serv
-
If any RME web servers are running, stop them by entering:
kill -9 process ID
-
Restart Essentials using one of the following commands, depending on your hardware platform:
-
-
If devices appear in Cisco WAN Manager, but have not been imported to the remote RME, have your system administrator verify that any routing information linking the WAN subnet address to the gateway node has also been added to the routers that connect the RME host to the gateway node.
If you still cannot import from the Essentials GUI, run the DataPrep.pl script from the command line instead.
The DataPrep.pl Tool
The DataPrep.pl tool is located in the %NMSROOT%\cgi-bin\import\pimport directory. It must be executed with the Perl command. The command directory location must be specified because the script is not in the same directory as the Perl executable. The syntax is displayed along with an explanation of the command's parameters. If the command is run on a remote database, it must be located on a UNIX host. The script tries to open a console connection to the host using the information provided in the command.
-
On UNIX, you must be logged in as root or bin or a group member of bin.
-
On Windows NT/2000, you must enter the following to run DataPrep: perl install directory\cgi-bin\import\pimport\DataPrep.pl
Description
The DataPrep.pl command is a front end for the RME and is used to extract device seed information from CiscoWorks, CiscoWorks for Switched Internetworks (CWSI), HP OpenView (HPOV), Tivoli NetView, and Cisco WAN Manager.
It exports the device table, administrative domains and annotation tables from these databases to create a readable ASCII file that contains the seed information that RME needs to add a device to its inventory. If the data is taken from CiscoWorks, HP OpenView or Tivoli NetView, it is possible to apply filtering on Cisco devices.
Dependencies
The following must be up and running: Perl, the Sybase isql (not the SQLAnywhere isql), the Sybase dataserver (CiscoWorks export), HP OpenView (HPOV export), Tivoli NetView (NetView export), CWSI's AniServer, the Informix isql, and the Informix date server (Cisco WAN Manager export). The CWSI AniServer name defaults to "AniServer."
During a local import, the user "bin" (Essentials on UNIX only) must have sufficient credentials to access the exporting system and databases.
During a remote database export, a valid entry in the rhosts database for the user (current uid or provided with the -U option) must exist on the remote machine, and the used account must have sufficient credentials to access the databases of the exporting systems.
In case of a remote import, rshd must be running on the remote machine and the required port/protocol must be allowed over the network.
Return Value
If the dependency check fails or the CiscoWorks admin password is incorrect, no output is generated and DataPrep.pl exits with a non-zero exit status. Otherwise, DataPrep.pl exits with zero status if all requests succeed.
Diagnostics
The tool "complains" if:
-
it cannot log into the CiscoWorks database
-
HP OpenView is not running
-
Tivoli NetView is not running
-
CWSI's AniServer is not running
-
the credentials are insufficient
-
the import file is invalid
Usage
DataPrep.pl [-a] [-p] [-x]
[ [-d<src>] [-H<host>] [-D<sysdir>]
[-S[<host>:]<inqep>] [-A<admin>] [-b<db>] [-u<user>]
[-K[<host>:]<knet>] [-r<cty>] [-w<cty>] [-c<ctyfile>]
[-U<ruser>] [-E<ani>
] | [-f<importfile>]
[-s<sep>] [-N<NIL>] [-L<file>] [-l<level>]
[+|-F] [-V<result>] [-P<pwd>] [<target>]
or
DataPrep.pl [-h]
where: (Default values in brackets [ ])
|
-h |
|
|
-a |
Deselect administrative domains from CiscoWorks data base (CWDB) |
|
-p |
Deselect "telnet" and "console (enable)" passwords from CWDB |
|
-x |
Use dB column information and produce extended output |
|
+F |
Turn device import filter on [default] |
|
-F |
Turn device import filter off |
|
-Vresult |
Validate command-line arguments & write results to file result |
|
-dsrc |
dB source is src = {cw | ov | cwsi | cwsi2 | snmpc | cr | cwm}; |
|
-Hhost |
dB host is host; [localhost] |
|
-Dsysdir |
System directory sysdir; [computed] |
|
-Uruser |
Remote user ID for host is ruser; [current user id] |
|
-S[host:]inqep |
CWDB inquiry engine path is inqep (on host) |
|
-Aadmin& |
CWDB administrator is admin |
|
-bdB |
CWDB name is dB |
|
-uuser |
CWDB user is user |
|
-K[host:]knet |
CWSI 1.3 known network is knet (on host) |
|
-fimportfile |
Use prepared importfile as dB source [STDIN] |
|
-ssep |
Set one-character field delimiter to sep; ['|'] |
|
-NNIL |
Set one-character SQL NULL replacement to NIL; ['-'] |
|
-Lfile |
Message logging in file file; [STDERR] |
|
-llevel |
Logging level of details is level, ranges from 0..7; [0] |
|
-Eani |
CWSI 2.x AniServer to contact for import; [AniServer] |
|
-rcty |
CWSI 1.3 read-community cty; [public] |
|
-wcty |
CWSI 1.3 write community cty; [private] |
|
-cctyfile |
CWSI 1.3 community file ctyfile |
|
-Ppwd |
CWDB password pwd to grant admin access |
|
output: target |
Generate output file target; [STDOUT] |
Examples
-
DataPrep.pl -d ov -H myhost -U myuser
Exports HPOV data from remote host "myhost" and uses the remote account "myuser" for the remote shell access.
-
DataPrep.pl -d cw -a -p -N "-" -x
Selects administration domains, telnet and console passwords, and produces an extended output on stdout. An additional SQL NULL translation takes place.
The output looks like this:
o o o
; Here are the columns of the table.
;
Col#=1; Name=Row#;
Col#=2; Name=Device name;
Col#=3; Name=Domain; NULL=-; Empty permitted;
Col#=4; Name=RO community string; NULL=-; Empty permitted;
Col#=5; Name=RW community string; NULL=-; Empty permitted;
Col#=6; Name=Telnet password; NULL=-; Empty permitted;
Col#=7; Name=Enable password; NULL=-; Empty permitted;
;
; Here are the rows of data.
;
000001|router1|cisco.com|public|public|-|-|
000002|router2|cisco.com|public|public|-|-|
000003|router3|cisco.com|public|public|-|-|
o o o
Troubleshooting Local NMS Import
A local import is a less complex process than a remote data import. The database and services for the other NMS reside on the same machine as CW2000, so there is no need for a remote shell protocol (RSH) to the remote server, and troubleshooting is simpler.
There are only a few things to do when troubleshooting a local import. First, remember that local imports do not happen from older versions of CiscoWorks. The older versions are removed prior to installation and the install process upgrades the data during the upgrade. What you can initially do is:
-
Verify the correct application services are running for the NMS that is the data source.
-
Verify the correct user name and permissions to be used by RME to log in to the NMS.
-
Use the DataPrep.pl script. The script uses the same parameters locally as it does remotely. The host defaults to local host if no host is specified.
Once information is added successfully to the inventory, troubleshooting moves to the process of managing the devices themselves.
-
For RME 2.x— Table 2-3 at Installing Essentials shows the table of supported NMS applications for Local RME Import along with their versions.
-
For RME 3.x— Table 1-5 at Installing Essentials shows the table of supported NMS applications for Local RME Import along with their versions.
Importing Devices Into Your Network Inventory Using CSV and DIF Files
Two methods are available for importing devices into your network inventory (applicable for RME 3.x only):
-
Comma-Separated Values (CSV) File
-
Device Integration File (DIF)
For ease of use, it is strongly recommended to use the CSV format. Samples of each type of file are found at the bottom of this document.
Note: The information in each file type must be entered in the order shown.
Comma-Separated Values (CSV) File
You can create a CSV file to import devices. Go to RME->Administration->Inventory->File Import to import the CSV file you created. The CSV format provides the following device information:
-
Full device name or IP address (required)
-
Read-only community string (required)
-
Read-write community string (optional)
-
Serial number (optional)
-
User Field 1 (optional)
-
User Field 2 (optional)
-
User Field 3 (optional)
-
User Field 4 (optional)
-
Telnet password, enable password, enable secret, TACACS user, TACACS password, TACACS enable user, TACACS enable password, local user, local password, RCP user, and RCP password (optional)
The following is a sample of a CSV-formatted file:
; The following header line is mandatory - only the value of the ; source attribute can be modified (e.g. source = My Excel spreadsheet). cisco Systems NM data import, source = Hand edit; Version = 2.0; Type = Csv ; ; Here are the columns of the table. ; ;Col# = 1; Name = Device name (include domain unless your site has ; unqualified device names registered in the name services ; - or - ; IP address in dotted decimal notation ;Col# = 2: Name = RO community string ;Col# = 3: Name = RW community string ;Col# = 4: Name = Serial Number ;Col# = 5: Name = User Field 1 ;Col# = 6: Name = User Field 2 ;Col# = 7: Name = User Field 3 ;Col# = 8: Name = User Field 4 ;Col# = 9; Name = Telnet password ;Col# = 10; Name = Enable password ;Col# = 11; Name = Enable secret ;Col# = 12; Name = Tacacs user ;Col# = 13; Name = Tacacs password ;Col# = 14; Name = Tacacs enable user ;Col# = 15; Name = Tacacs enable password ;Col# = 16; Name = Local user ;Col# = 17; Name = Local password ;Col# = 18; Name = Rcp user ;Col# = 19; Name = Rcp password; Comment = not used, leave blank ; ; Here are the rows of data. ; bigrouter.yourcompany.com,public,private,, dev-2501.yourcompany.com,"Not so, "" public as, thought",private,sn2501, dev-2502.yourcompany.com,public,"private",sn2502, dev-2503.yourcompany.com,public,private,sn2503,"" dev-2504.yourco.com,public,private,sn2504,us1,us2,us3,us4,tPass,ePass,eSecret,tUsr,tPass,t eUsr,tePass,LUsr,LPass,rUsr,rPass dev-2505.yourco.com,public,private,sn2505,usr1,,,usr4,,,esecret,,tUsr,tPass,,,LUsr,lPass dev-2507.yourcompany.com,public,private,sn2507, dev-2509.yourcompany.com,public,private,sn2509, dev-2510.yourcompany.com,public,private,sn2510, dev-2511.yourcompany.com,public,private,sn2511, dev-2512.yourcompany.com,public,private,sn2512, dev-2513.yourcompany.com,public,private,sn2513, dev-2514.yourcompany.com,public,private,sn2514, dev-2515.yourcompany.com,public,private,sn2515, dev-2516.yourcompany.com,public,private,sn2516, dev-4000.yourcompany.com,public,private,,Big Boys dev-4500.yourcompany.com,public,private,,Big Boys dev-7000.yourcompany.com,public,private,,Big Boys dev-7010.yourcompany.com,public,private,,Big Boys dev-2517.yourcompany.com,public,private,,,nm 25xx dev-2518.yourcompany.com,public,private,,,mylabel2 dev-2520.yourcompany.com,public,private,,,mylabel2 dev-2521.yourcompany.com,public,private,,,mylabel2 dev-2522.yourcompany.com,public,private,,,mylabel2 dev-2523.yourcompany.com,public,private,,,mylabel2 dev-2524.yourcompany.com,public,private,,,mylabel2 dev-2525.yourcompany.com,public,private,,,mylabel2 dev-4700.yourcompany.com,public,private,,yourlabel1,,yourlabel3,yourlabel4 dev-7206.yourcompany.com,public,private,, dev-7505.yourcompany.com,public,private,,,,,yourlabel4 dev-7507.yourcompany.com,public,private,, dev-7513.yourcompany.com,public,private,, dev-1200.yourcompany.com,public,private,, dev-2900.yourcompany.com,public,private,, dev-3000.yourcompany.com,public,private,, dev-5000.yourcompany.com,public,private,, 111.222.33.44,public,public,,
Device Integration File (DIF)
You can create a DIF to import devices. Select RME->Administration->Inventory->File Import to import the DIF file you created. The DIF is currently encoded in the ISO Latin-1 character set using an extended "Backus Naur Form" (BNF) notation as described in the RME online help. The DIF specifies the following characteristics of each device:
Generic format
Generic attributes
Header
Table area
Generic table attributes
Device table
Group table
User annotation table
Serial number table
TACACS table
The following is a sample DIF, incorporating these characteristics. The sample file was imported from CiscoWorks.
!--- First, the DIF is defined. cisco Systems NM data import, source=CW; Version = 1.0; !--- The device table is defined. Table name = Device basic inventory; Version = 1.0; Column count = 7; Separator = |; !--- Columns for the device table are defined. Col# = 1; Name = Row#; Col# = 2; Name = Device name; Col# = 3; Name = Domain; Col# = 4; Name = RO community string; Col# = 5; Name = RW community string; Col# = 6; Name = Telnet password; Col# = 7; Name = Enable password; !--- Rows of data for the device table are defined. 000001|111.22.333.4||||fooey|more 000002|landfall|cisco.com|public|private|| 000003|yet_another_router||read|write|main|charlie 000004|Pinpointed_router|organized.org|read|write|viper|eric 999999 !--- An administrative domain table is defined. Table name = Device grouping; Version = 1.0; Column count = 4; Separator = $ !--- Columns for the domains table are defined. Col# = 1; Name = Row# Col# = 2; Name = Group Col# = 3; Name = Device name Col# = 4; Name = Domain !--- Rows of data for the domain table are defined. 000001$CW_World$111.22.333.4$ 000002$CW_World$yet_another_router$ 000003$CW_World$landfall$cisco.com$ 000004$CW_Smaller than world$yet_another_router$ 999999 !--- The user annotation table is defined. Table name = Device annotations; Version = 1.0; Column count = 7; Separator = $ !--- Columns for the annotation table are defined. Col# = 1; Name = Row# Col# = 2; Name = Device name Col# = 3; Name = Domain Col# = 4; Name = Annotation 1 Col# = 5; Name = Annotation 2 Col# = 6; Name = Annotation 3 Col# = 7; Name = Annotation 4 !--- Rows of data for the annotations table are defined (the first annotation holds location; !--- the second annotation holds the contact name). 000001$111.22.333.4$$San Jose: Bldg F$Joe Smith 000002$yet_another_router$$San Jose: Bldg A$Jill Jones 000003$landfall$cisco.com$San Jose: Bldg F$Joe Smith 000004$yet_another_router$Santa Clara: Bldg 1$George Black 999999 !--- The serial number table is defined. Table name = Device serial numbers; Version = 1.0; Column count = 4; Separator = $ Col# = 1; Name = Row# Col# = 2; Name = Device name Col# = 3; Name = Domain Col# = 4; Name = Serial number !--- RCP data is provided. 000001$111.22.333.4$$jsmith$1dasf8 000002$yet_another_router$$jjones$1ruf7dhgd 000003$landfall$cisco.com$jsmith$1dasf8 000004$yet_another_router$gblack$7fghs4 999999 !--- The TACACS table is defined. Table name = Device Tacacs access data; Version = 1.0; Column count = 7; Separator = $ Col# = 1; Name = Row# Col# = 2; Name = Device name Col# = 3; Name = Domain Col# = 4; Name = Tacacs user Col# = 5; Name = Tacacs password Col# = 6; Name = Tacacs Enable User; Col# = 7; Name = Tacacs Enable Password; !--- TACACS data is provided. 000001$111.22.333.4$$jsmith$3dfg6$stillJsmith$butNot3dfg6 000002$yet_another_router$$jjones$adf6789 000003$landfall$cisco.com$jsmith$3dfg6 000004$yet_another_router$gblack$jh3df7 999999
NetPro Discussion Forums - Featured Conversations
| NetPro Discussion Forums - Featured Conversations for Network Management |
| Network Infrastructure: Network Management |
| Virtual Private Networks: Network and Policy Management |
Related Information
- RME Inventory: Frequently Asked Questions
- Resource Manager Essentials
- Technical Support - Cisco Systems
| Updated: Jan 31, 2006 | Document ID: 13483 |
