Skip to content

sftp

Writes files to an SFTP server.

Introduced in version 3.39.0.

# Common config fields, showing default values
output:
label: ""
sftp:
address: "" # No default (required)
credentials:
username: ""
password: ""
host_public_key_file: "" # No default (optional)
host_public_key: "" # No default (optional)
private_key_file: "" # No default (optional)
private_key: "" # No default (optional)
private_key_pass: ""
path: "" # No default (required)
codec: all-bytes
max_in_flight: 64

In order to have a different path for each object you should use function interpolations described here.

Performance

This output benefits from sending multiple messages in flight in parallel for improved performance. You can tune the max number of in flight messages (or message batches) with the field max_in_flight.

Fields

address

The address of the server to connect to.

Type: string

connection_timeout

The connection timeout to use when connecting to the target server.

Type: string

Default: "30s"

credentials

The credentials to use to log into the target server.

Type: object

credentials.username

The username to authenticate with the SFTP server.

Type: string

Default: ""

credentials.password

The password for the specified username to connect to the SFTP server.

Type: string

Default: ""

credentials.host_public_key_file

The path to the SFTP server’s public key file, used for host key verification.

Type: string

credentials.host_public_key

The raw contents of the SFTP server’s public key, used for host key verification.

Type: string

credentials.private_key_file

The path to the private key file, used for authenticating the username.

Type: string

credentials.private_key

The raw contents of the private key, used for authenticating the username.

Type: string

credentials.private_key_pass

Optional passphrase for decrypting the private key, if it’s encrypted.

Type: string

Default: ""

path

The file to save the messages to on the server. This field supports interpolation functions.

Type: string

codec

The way in which the bytes of messages should be written out into the output data stream. It’s possible to write lines using a custom delimiter with the delim:x codec, where x is the character sequence custom delimiter.

Type: string

Default: "all-bytes"

OptionSummary
all-bytesOnly applicable to file based outputs. Writes each message to a file in full, if the file already exists the old content is deleted.
appendAppend each message to the output stream without any delimiter or special encoding.
delim:xAppend each message to the output stream followed by a custom delimiter.
linesAppend each message to the output stream followed by a line break.
# Examples
codec: lines
codec: "delim:\t"
codec: delim:foobar

max_in_flight

The maximum number of messages to have in flight at a given time. Increase this to improve throughput.

Type: int

Default: 64