Plugin: SFTP gatherer
Purpose
Use this plugin when you need to download and index content from an SFTP server.
|
Usage
Enable the plugin
-
Select Plugins from the side navigation pane and click on the SFTP gatherer tile.
-
From the Location section, select the data source to which you would like to enable this plugin from the Select a data source select list.
The plugin will take effect after setup steps and an advanced > full update of the data source has completed. |
Configuration settings
The configuration settings section is where you do most of the configuration for your plugin. The settings enable you to control how the plugin behaves.
The configuration key names below are only used if you are configuring this plugin manually. The configuration keys are set in the data source configuration to configure the plugin. When setting the keys manually you need to type in (or copy and paste) the key name and value. |
SFTP server host
Configuration key |
|
Data type |
string |
Required |
This setting is required |
Host name or IP address of the SFTP server. e.g. sftp.example.com or 201.75.44.21
SFTP user name
Configuration key |
|
Data type |
string |
Required |
This setting is required |
User name used to access SFTP server.
SFTP password
Configuration key |
|
Data type |
Encrypted string |
Required |
This setting is required |
Password used to access SFTP server.
SFTP server port
Configuration key |
|
Data type |
integer |
Default value |
|
Required |
This setting is required |
SFTP server port. e.g. 5002
File name
Configuration key |
|
Data type |
string |
Required |
This setting is required |
File to download from the SFTP server (including path). Set 'Parameter 1' to a unique value for the file (e.g. '1', '2')
Multiple files can be downloaded by defining adding additional URLs, however each key only defines a single file to download and must have a unique parameter 1 value set. |
File MIME type
Configuration key |
|
Data type |
string |
Required |
This setting is required |
MIME type that will be set for all files downloaded by the plugin.
The plugin only accepts a single MIME type which will be applied to all downloaded files.
Common MIME types are text/xml
for XML, application/json
for JSON, and text/csv
for CSV.
Store URL
Configuration key |
|
Data type |
string |
Default value |
|
Required |
This setting is optional |
Prefix that is attached to the file name, which defines the URL that will be used to store documents.
Examples
Example: Download a single file
The configuration below will configure the custom data source to download a single document myfiles\myXMLFileToIndex.xml
from the SFTP host my.ftp.server.com:5002
.
The file will be indexed as an XML file and have the URL: <data source name>/datafile
(where <data source name>
is replaced with the ID of your custom data source).
Enter the following into the corresponding fields when setting up your plugin:
Field | Value |
---|---|
SFTP server host |
|
SFTP server port |
|
SFTP user name |
|
SFTP user password |
|
File name |
|
File MIME type |
|
-
The password you enter is automatically encrypted when you save the value. If you view the configuration via the results page configuration key editor or raw editor you will see a value like
ENCRYPTED:AQX7ZRgj4x0xVpOSA4kWIN9UR2tUFjnI8GMK6FfW6
which corresponds to the value you entered. -
When defining the file name(s) you need to enter a unique identifier into the Parameter 1 field. This is required to support downloading of more than one file and can just be a number like
1
,2
etc. -
This plugin supports the client side of the sftp protocol in version 3. As a result all files are downloaded as binary files. The MIME type of the downloaded files must be provided in your configuration. All documents downloaded in this configuration will be stored as XML documents.
Example: Download multiple files
In this example multiple files are configured to be downloaded. This example extends the configuration from the above example to download two additional files. It also sets the URL prefix to add when indexing the documents and sets a 10 second timeout for connection to the SFTP server.
Field | Parameter 1 | Value |
---|---|---|
File name |
|
|
File name |
|
|
Store URL |
(not applicable) |
|
SFTP server connection timeout |
(not applicable) |
|
Funnelback requires all indexed documents to have a URL. If the document will be split later (for example, a JSON file converted to XML then split along an X-Path), each record will get its own URL based on the settings you configure when splitting and thus this URL of the overall document doesn’t matter. If not supplied, a dummy URL will be used
|