Importing network device data
The CiscoWorks import tool creates network device entries in the datastore. The import tool creates and updates Network Device nodes.
Entries in the datastore for a network device are overwritten if a network device in the input data has the same name.
A limitation of the importer is that a network device already in the datastore for which a matching name cannot be found in the input data will not be removed. Therefore if a network device has been renamed since a previous import, it will appear in the datastore as a second network device.
Use of imported data and direct discovery is not supported
If you use the CiscoWorks import tool to import network devices, and also scan the same network devices, this will potentially generate duplicate network devices. BMC recommends that you use either direct discovery or import, not both.
Importing data from CiscoWorks
The CiscoWorks importer loads the data file exported from CiscoWorks LMS using the Campus Manager User Tracking tool, and loads any existing network device data from the BMC Atrium Discovery datastore. It then compares the sets of data. The supported versions are Campus Manager 3.x and 4.x (UT CLI 1.0, 1.1, and 1.1.1).
The network device name is used as the index. Therefore, if two network devices have the same name, they are treated as the same network device.
- If a new network device is found in the exported file, it is added to the BMC Atrium Discovery datastore. The name of the network device is used as its primary key. See the note below regarding deletion of network devices.
- The ports on each network device are updated. These are indexed by IP address (the primary key). Port attributes that are updated include speed, duplex, and IP address. New ports (identified by IP address) are added, and any ports removed from the CiscoWorks data are removed from the datastore.
Importing a CiscoWorks data file
To import a CiscoWorks Data File:
From the Discovery section of the Administration tab, select Ciscoworks Import.
The options on this page are described below:Field Name
Details
File To Upload
The file to upload. Click Browse... to display a file browser window. Select the file to import and click Open.
File Type
Choose the type of file to import. Choose either XML or delimited from the File Type list.
If you select XML, the lists for File Delimiter and File Has Header Line are dimmed.File Delimiter
For a delimited file only, select the delimiter type from the File Delimiter list. This can be one of Comma, Tab, or Space.
File Has Header Line
Choose Yes or No from the File Has Header Line list depending on whether the delimited file has a heading line.
Remove existing Network Devices
Do you want to remove existing network devices from the BMC Atrium Discovery datastore that are not present in the file you are importing? Choose Yes or No from the Remove existing Network Devices list.
Logging Level
Choose the logging level from the Logging Level list. This can be Debug, Info, Warning, Error, or Critical.
- To import the CiscoWorks data file, click Apply.
There is also a command line utility available for importing CiscoWorks data. It is described in tw_imp_ciscoworks.
Generating CiscoWorks data
To export data from CiscoWorks in a layout which the importer can use, you must create a custom layout. To do this:
- From the CiscoWorks LMS Portal, select Reports.
- Select Custom Layouts.
- Click Create.
- In the Add Layout dialog box, select End Host.
- Select the columns that you want displayed in the report from the Available Sources list and click Add to add them to the Selected Sources list.
Arrange these into the required order using the up and down arrows.
The import file must be in the following order otherwise data will be imported into the wrong attribute, and the import will fail. More or fewer columns will also cause the import to fail:CM 3 to 4 layout
CM 4.0.6 layout
UserName
MACAddress
HostName
IPAddress
Subnet
DeviceName
Device
Port
PortName
PortState
VTPDomain
VLAN
VLANType
LastSeen
Notes
PortDuplex
PortSpeed
VLANIdUser Name
MAC Address
Host Name
IP Address
Subnet
Device Name
Device
Port
Port Name
Port State
VTP Domain
VLAN
VLAN Type
Last Seen
Prefix
Port Duplex
Port Speed
VLAN Id- Specify the name of the layout as
StandardTideway
and enter a description. - To create the
StandardTideway
layout, click Add.
- Specify the name of the layout as
The full instructions are available on the Cisco Systems website.
The following methods of generating the CiscoWorks data are supported.
Generating CSV files
Generating CSV files on the CiscoWorks server:
C:\Program Files\CSCOpx\campus\bin\ut -cli -query all -layout StandardTideway -export c:\data.csv -u user -p password
This command produces a Java stack trace. This is a known issue and can be ignored.
The file that is produced can be imported by running the following command on the BMC Atrium Discovery appliance:
$TIDEWAY/bin/tw_imp_ciscoworks --delimiter=',' --username name --password password --file ~/tmp/data.csv
Generating XML import files
Generating XML files on the CiscoWorks server:
C:\Program Files\CSCOpx\campus\bin\cmexport ut -u userid -p password -host -layout StandardTideway
The file is written into the following directory:
C:\PROGRAM FILES\CSCOpx\files\cmexport\ut
The file that is produced can be imported with the following command on the BMC Atrium Discovery appliance:
$TIDEWAY/bin/tw_imp_ciscoworks --xml --username name --password password --file ~/tmp/2006516154526ut.xml
The following attributes are imported into the data store, where they exist in the input file:
Attribute | Description | Example | Notes |
---|---|---|---|
MacAddress | MAC address of port on connected device. This is not the MAC address of the network device |
| Must be a valid MAC address |
IPAddress | IP address of port on connected device. This is not the IP address of the network device |
| Must be a valid IP address |
DeviceName | Name of network device |
| |
Device | IP address of network device |
| Must be a valid IP address |
Port | Port name |
| |
PortDuplex | Duplex setting of port |
| |
PortSpeed | Speed setting of port |
| Must be a power of ten with K/M/G suffix |
PortNegotiation | Negotiation setting of the Port. |
|
|
Comments