Pre-Collected Device Configuration Files : Remote File Collection
  
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 filename prefix and filename 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:
Files must meet Input file criteria for CLI files.
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 precollected device configuration files using Remote File Collection.
To import precollected device configuration files using Remote File Collection
1. Ensure that input files meet Input file criteria for CLI files.
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.