Pre-Collected Device Configuration Files
This section describes how to import previously collected device configuration files and other CLI device data into NetIM. NetIM collects and archives pre-collected configuration files and other CLI data using External Data Collection. The Pre-Collected Files Adapter component is useful for files stored locally on the NetIM host. The Remote File Collection component of External Data Collection can be used to copy (via FTP or SFTP) remote files to the NetIM host.
CLI data files collected either by the Pre-Collected Files Adapter or Remote File Collection are imported into NetIM by the Network Data Import adapter. You must include both External Data Collection (with Pre-Collected Files Adapter or Remote File Collection active, as appropriate) and Network Data Import in the schedule chain. For your convenience, a predefined schedule chain named Pre-Collected Files Chain is provided. It contains both External Data Collection and Network Data Import as well as other recommended adapters.
Links are not created automatically when device data is imported. For more information about how link and connection inference uses device data stored in the NetIM database to infer connections, see
“How NetIM Infers Links and Connections".
Input file criteria for CLI files
When input files are supplied by Device Config File Collection or a collection adapter that integrates with a network management system (for example, Opsware NAS or Alcatel 5620 SAM-O), the files contain required fields needed for the CLI Data Import adapters NetIM to recognize and import supported formats. When you supply CLI data files that you have obtained using another mechanism—a custom archiving environment, script, or network management system for which NetIM does not provide a collection adapter—you must ensure that the input files meet the following criteria:
• The output of each show command must be stored in a separate file with the exception of version and memory data which may be stored in the same file.
• Each file must begin or end with a device prompt.
• For a file to be parsed and imported into NetIM, it must be obtained by executing a configuration command supported by NetIM for that data type and vendor. See
Configuring Device Drivers for the supported commands for each system-defined device driver. Other commands can be collected and archived, but will not be imported.
Short versions of commands are not supported.
• Each file must contain the device console (“show”) command that was used to collect the output.
• Files for the same device must use the same root filename. As an example, an appropriate naming scheme for CLI data for a device named routerA is routerA.cfg, routerA.cdp, routerA.interface, and so on.
A file named routerA.lab.opnet.com.version will not merge with a file name routerA.cfg.
• Each file must have a specific file extension to designate the file type.
The following table lists the default CLI command types for NetIM and provides the required file extension for each. You can add your own command types using the Command Type Manager. If you add a command type, the file extension for input files you supply must match the file extension defined in the command type manager.
Data type | File extension |
Alarms | alarms |
All Contexts Configuration | allContexts |
APS | aps |
ARP Table | arp |
Asymmetric Route | asymRoute |
BGP RIB | bgpRib |
CAM Table | cam |
CDP | cdp |
CheckPoint Rules | rules.C |
CheckPoint Objects | objects.C |
Configuration | cfg |
FEX | fex |
Frame-Relay Map | frMap |
HSRP Standby | standby |
HTTP | http |
ifIndex | ifIndex |
IGMP Group | igmpGroup |
Interface | interface |
IP Route | ipRoute |
IPv6 Interface | ipv6Interface |
ipv6Route | ipv6Route |
LACP | lacp |
LLDP | lldp |
Module | module |
MPLS TE Tunnels | mplstetunnels |
Multicast route | multicastRoute |
Next Hop | nextHop |
Objects.C | objects.C |
Redundancy | redundancy |
Rules.C | rules.C |
SRP | srp |
Startup Configuration | startup |
STP | stp |
Traceroute | trc |
Trace Route | trc |
Trunk | trunk |
Version | version |
VLAN | vlan |
VTP | vtp |
WAN Optimization Neighbors | wanoptNeighbors |
WAN Optimization Peers | wanoptPeers |
Pre-Collected Files Adapter
If you have a custom archiving environment or other source of device configuration files, you may choose to run a cron job or write your own program to copy input files to the appropriate location on NetIM core, making them available for import the Pre-Collected Files Adapter.
Requirements for Pre-Collected Files Adapter
The Pre-Collected Files Adapter has the following requirements:
• Input files must be placed in the following input file directory for the Pre-Collected Files Adapter:
/data1/riverbed/NetIM/op_admin/tmp/vne/Input
Files may be placed in subdirectories (for example, by device or by type) within the specified input directory, but this is not required. For example you may put all of the configuration files in a subdirectory named Input/Configs.
Perform the following procedure to import pre-collected device configuration files using the Pre-Collected Files Adapter.
To import pre-collected device configuration files
2. Place the files to be imported in the input directory. The default input directory for the Pre-Collected Files Adapter is /data1/riverbed/NetIM/op_admin/tmp/vne/Input.
3. Log in as a user with administrative privilege.
4. Choose Administration > Advanced Management, and select the Schedule Chains tab.
5. Select the Pre-Collected Files Chain and make the chain Active. Click OK to save your changes.
6. Expand the Pre-Collected Files Chain, and select External Data Collection.
7. Ensure that the Pre-Collected Files Adapter is Active. If it is not active, make it active then click OK to save your changes.
8. Run the Pre-Collected Files Chain.
9. Schedule the Pre-Collected Files Chain to run on a regular basis. Schedule the frequency based on how often the input files are updated. For example, if new input files are provided on a weekly basis, schedule this chain to run every week after the files are updated.
You must copy new input files into this directory on a regular basis to keep NetIM up to date.
During the scheduled collection (set in the Basic Setup wizard), NetIM will import your pre-collected configuration files.
Remote File Collection
If you have a custom archiving environment or other source of device config files, you may choose to run a cron job or write your own program to copy input files to the appropriate location on the NetIM host, making them available for the
“Pre-Collected Files Adapter". If the files are stored on a remote server, you can collect them using Remote File Collection.
The External Data Collection adapter provides the Remote File Collection adapter to retrieve files from other hosts, making them available for import into NetIM via the CLI Data Import Adapters in Network Data Import. Remote File Collection uses File Transfer Protocol (FTP) or Secure File Transfer Protocol (SFTP) to retrieve files. It is mainly used to obtain files for processing by import adapters. Some use cases are:
• Retrieving config files from a custom config archiving environment
• Retrieving interface utilization or traffic flow files
Remote File Collection supports file filtering based upon file name prefix and file name extension. When filtering is configured, the only files retrieved are those matching the filter specification.
You can retrieve files from more than one remote directory by editing the properties for the Remote File Collection to add as many remote directory property trees as you need for your environment. You can also retrieve files from subdirectories under any specified remote directory. Note that when this feature is enabled, directory hierarchy is not preserved. All collected files are written to the specified storage directory.
When specifying directory paths, always provide the full path.
Remote File Collection is typically used to copy files from other hosts that have been collected by third-party or “home-grown” applications. Configure this adapter to copy the data files to the local directory where Network Data Import will process the files. If you are collecting files for import by Device Config File Import and the CLI Data Import adapters, we recommend that you copy these files to <temp dir>\Input or another appropriately named directory. For more information about the requirements for importing config files and other CLI Data Files, see
Input file criteria for CLI files. You must include Network Data Import in the same chain as Remote File Collection to import the files copied by Remote File Collection.
Requirements for Remote File Collection
Remote File Collection has the following requirements:
The following table lists the configuration properties for Remote File Collection.
Adapter property | Description |
sourceList | Contains list of remote file servers. |
server1 |
active | Controls whether files are collected from this server. |
ftp |
connectionType | Specifies FTP or SFTP as the type of connection. |
hostName | Specifies the name or address of the file server. |
userName | Specifies the username used to log in to the server. |
password | Specifies the password used to log in to the server. |
timeout(mSec) | Specifies the FTP connection timeout value. |
retries | Specifies the FTP connection retry value. |
Remote Directory List |
dir1 |
Remote Directory Full Path | Specifies the path on the remote host from which files are collected. |
FilenamePrefix | Specifies a prefix string used to filter files by name. Only files matching the prefix string are copied from the remote server. |
FilenameExtension | Specifies a file extension used to filter files by name. Only files matching the extension are copied from the remote server. |
Include Subdirectory | Specifies whether files are also retrieved from subdirectories. |
Storage | Specifies the directory to which retrieved files are written. |
server2 | Contains the settings for server2. |
Perform the following procedure to import pre-collected device configuration files using Remote File Collection.
To import pre-collected device configuration files using Remote File Collection
2. Log in as a user with administrative privilege.
3. Choose Administration > Advanced Management, and select the Schedule Chains tab.
4. Select the Pre-Collected Files Chain and make the chain Active. Click OK to save your changes.
5. Expand the Pre-Collected Files Chain, and select External Data Collection.
6. Expand Remote File Collection and make it Active. Expand Pre-Collected Files Adapter and make it Inactive. Click OK to save your changes.
7. Configure Remote File Collection as appropriate for your environment.
8. Run the Pre-Collected Files Chain.
9. Schedule the Pre-Collected Files Chain to run on a regular basis. Schedule the frequency based on how often the input files are updated. For example, if new input files are provided on a weekly basis, schedule this chain to run every week after the files are updated.
You must copy new input files into this directory on a regular basis to keep NetIM up to date.