SFTP Collection Agent Configuration

To open the SFTP collection agent configuration, click  Build → New Configuration . Select  Workflow  from the Configurations dialog. When prompted to Select workflow type , select Batch. Click Add agent and select SFTP in the Collection tab in the Agent Selection dialog. Double-click the agent icon or right-click the icon and select Edit agent, to display the Agent Configuration dialog.

You can configure part of the parameters in the Filename Sequence or Sort Order service tabs, see Workflow Template for more information.

The Configuration view consists of the following tabs:

  • Connection

  • Source

  • Advanced

  • Security

Connection Tab

The Connection tab contains configuration settings related to the remote host and authentication.

The SFTP collection agent configuration - Connection tab

Setting

Description

Setting

Description

Connection Information Settings

Host

Primary host name or IP-address of the remote host to be connected. If a connection cannot be established to this host, the Additional Hosts, specified in the  Advanced  tab, are tried.

File System Type

Type of file system on the remote host. This information is used to construct the remote filenames.

  • Unix - remote host using Unix file system. Default setting.

  • Windows NT - remote host using Windows NT file system.

Authentication Mechanism Settings

Authenticate With

Choice of authentication mechanism. Both password and private key authentication are supported.

Username

Username for an account on the remote host, enabling the SFTP session to login.

Password

Password related to the specified Username. This option only applies when password authentication is enabled.

Private Key

When you select this option, a Select... button will appear, which opens a window where the private key may be inserted. If the private key is protected by a passphrase, the passphrase must be provided as well. This option only applies when private key authentication is enabled. For further information, see Authentication in SFTP Agents Preparations.

Collection Retries Settings

Enable

Select this check box to enable repetitive attempts to connect and start a file transfer.

When this option is selected, the agent will attempt to connect to the host as many times as is stated in the Max Retries field described below. If the connection fails, a new attempt will be made after the number of seconds entered in the Retry Interval (s) field described below.

Retry Interval (s)

Enter the time interval in seconds, between retries.

If a connection problem occurs, the actual time interval before the first attempt to reconnect will be the time set in the Timeout field in the Advanced tab plus the time set in the Retry Interval (s) field. For the remaining attempts, the actual time interval will be the number seconds entered in this field.

Max Retries

Enter the maximum number of retries to connect.

In case more than one connection attempt has been made, the number of used retries will be reset as soon as a file transfer is completed successfully.

Note!

This number does not include the original connection attempt.

 

Restart Retries Settings

Enable

Select this check box to enable the agent to send a RESTART command if the connection has been broken during a file transfer. The RESTART command contains information about where in the file you want to resume the file transfer.

When this option is selected, the agent will attempt to re-establish the connection, and resume the file transfer from the point in the file stated in the RESTART command, as many times as is entered in the Max RESTARTS field described below. When a connection has been re-established, a RESTART command will be sent after the number of seconds entered in the Retry RESTART Interval (s) field described below.

Note!

The  RESTART Retries  settings will not work if you have selected to decompress the files in the  Source  tab, see the section below, Source Tab.

 

Retry Restarts Interval (s)

Enter the time interval, in seconds, you want to wait before initiating a restart in this field. This time interval will be applied for all restart retries.

If a connection problem occurs, the actual time interval before the first attempt to send a RESTART command will be the time set in the Timeout field in the Advanced tab plus the time set in the Retry Interval (s) field. For the remaining attempts, the actual time interval will be the number seconds entered in this field.

Max Restarts

Enter the maximum number of restarts per file you want to allow.

In case more than one attempt to send the RESTART command has been made, the number of used retries will be reset as soon as a file transfer is completed successfully.

Source Tab

The Source tab contains configurations related to the remote host, source directories and source files. The configuration available can be modified by creating and selecting a customized Collection Strategy. The following text describes the configuration options available when no customized Collection Strategy has been selected.

The SFTP collection agent configuration - Source tab

Setting

Description

Setting

Description

Collection Strategy

If there are more than one collection strategy available in the system a Collection Strategy drop down list will also be visible containing the available strategies. For further information about the nature of the collection strategy, see Appendix 4 - Collection Strategies.

File Information Settings

Directory

Absolute pathname of the source directory on the remote host, where the source files reside. The pathname might also be given relative to the home directory of the Username account.

Include Subfolders

Select this check box if you have subfolders in the source directory from which you want files to be collected.

Note!

Subfolders that are in the form of a link are not supported.

If you select Enable Sort Order in the Sort Order tab, the sort order selected will also apply to subfolders.

Filename

Name of the source files on the remote host. Regular expressions according to Java syntax applies. For further information, see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.

 

Compression

Compression type of the source files. Determines whether the agent will decompress the files before passing them on in the workflow or not.

  • No Compression - the agent will not decompress the files.

  • Gzip - the agent decompresses the files using gzip.

Before Collection Settings

Move to Temporary Directory

If enabled, the source files will be moved to the automatically created subdirectory DR_TMP_DIR in the source directory, prior to collection. This option supports safe collection of a source file reusing the same name.

Append Suffix to Filename

Enter the suffix that you want added to the file name prior to collecting it.

 

Inactive Source Warning (h)

If enabled, when the configured number of hours have passed without any file being available for collection, a warning message (event) will appear in the System Log and Event Area:

The source has been idle for more than <n> hours, the last inserted file is <file>.

After Collection Settings

Move to

If enabled, the source files will be moved from the source directory (or from the directory DR_TMP_DIR, if using Move to Temporary Directory) after collection, to the directory specified in the Destination field. If Prefix or Suffix are set, the file will be renamed as well.

Destination

Absolute pathname of the directory on the remote host into which the source files will be moved after the collection. This field is only available if Move to is enabled.

Prefix and Suffix

Prefix and/or suffix that will be appended to the beginning and/or the end, respectively, of the source files after the collection. These fields are only available if Move to or Rename is enabled.

Search  and  Replace

To apply Search and Replace, select either Move to or Rename.

  • Search: Enter the part of the filename that you want to replace.

  • Replace: Enter the replacement text.

Search and Replace operate on your entries in a way that is similar to the Unix  sed  utility. The identified filenames are modified and forwarded to the following agent in the workflow.

This functionality enables you to perform advanced filename modifications, as well:

  • Use regular expression in the Search entry to specify the part of the filename that you want to extract.

    Enter Replace with characters and metacharacters that define the pattern and content of the replacement text.

     

Keep (days)

Number of days to keep moved or renamed source files on the remote host after the collection. In order to delete the source files, the workflow has to be executed (scheduled or manually) again, after the configured number of days.

Rename

If enabled, the source files will be renamed after the collection, remaining (or moved back from the directory DR_TMP_DIR, if using Move to Temporary Directory) in the source directory from which they were collected.

Remove

If enabled, the source files will be removed from the source directory (or from the directory DR_TMP_DIR, if using Move to Temporary Directory), after the collection.

Ignore

If enabled, the source files will remain in the source directory after the collection. This option is not available if Move to Temporary Directory is enabled.

UDR Type Settings

Route FileReferenceUDR

Select this check box if you want to forward the data to an SQL Loader agent. See the description of the SQL Loader agent in SQL Loader Agent for further information

Advanced Tab

The Advanced tab contains configurations related to more specific use of the SFTP Advanced service.

Setting

Description

Setting

Description

Advanced Settings

Port

The port number the SFTP service will use on the remote host.

Timeout (s)

The maximum time, in seconds, to wait for response from the server. 0 (zero) means to wait forever.

Accept New Host Keys

If selected, the agent overwrites the existing host key when the host is represented with a new key. The default behavior is to abort when the key mismatches.

 

Enable Key Re-Exchange

Used to enable and disable automatic re-exchange of session keys during ongoing connections. This can be useful if you have long lived sessions since you may experience connection problems for some SFTP servers if one of the sides initiates a key re-exchange during the session.

Additional Hosts Settings

Additional Hosts

List of additional host names or IP-addresses that may be used to establish a connection. These hosts are tried, in sequence from top to bottom, if the agents fail to connect to the remote host set in their Connection tabs.

Use the Add, Edit, Remove, Move up and Move down buttons to configure the host list.

Security Tab

The Security tab contains configurations related to the Advanced Security Options for SFTP. The Configuration available can be modified by selecting the Advanced Security Option check box. If the advanced security is not enabled, the Cipher Mode will default to aes128-ctr and the HMac Type will default to hmac-sha2-256. If advanced security is enabled but the combo box fields are left empty, the Cipher Mode will default to aes128-ctr and the HMac Type will default to hmac-sha2-256.

The SFTP collection agent configuration - Security tab

 

Setting

Description

Setting

Description

Cipher Mode

Algorithms for the Block Cipher Modes supported by the SFTP agent. This allows the agent to determine which algorithm for the block cipher to be used when communicating with the SFTP servers.

  • 3des-cbc

  • 3des-ctr

  • blowfish-cbc

  • aes128-cbc

  • aes192-cbc

  • aes256-cbc

  • aes128-ctr

  • aes192-ctr

  • aes256-ctr

  • arcfour

  • arcfour128

  • arcfour256

HMac Type

Methods of encryption for Key Exchange. This allows the agent to determine the method of encryption to be used when the keys are exchanged between the SFTP servers and the SFTP agent.

  • hmac-sha1

  • hmac-sha1-96

  • hmac-sha1-etm@openssh.com

  • hmac-md5

  • hmac-md5-96

  • hmac-md5-etm@openssh.com

  • hmac-sha2-256

  • hmac-sha2-256-96

  • hmac-sha2-256-etm@openssh.com

  • hmac-sha2-512

  • hmac-sha2-512-96

  • hmac-sha2-512-etm@openssh.com

  • hmac-ripemd160

  • hmac-ripemd160-etm@openssh.com