FetchSFTP Processor
描述
从远程 SFTP 服务器获取文件内容,并用远程文件的内容覆盖传入 FlowFile 的内容。
标签
多处理器协同场景
检索 SFTP 服务器目录中的所有文件
"Hostname" 属性应设置为 FTP 服务器的完全限定主机名。最好通过将其设置为类似 `#{SFTP_SERVER}` 的值来参数化 此属性。
"Remote Path" 属性必须设置为文件所在 FTP 服务器上的目录。如果要构建的流程将在其他地方重用, 最好通过将其设置为类似 `#{SFTP_REMOTE_PATH}` 的值来参数化此属性。
将 "Username" 属性配置为用于登录 FTP 服务器的适当用户名。通常最好通过将其设置为类似 `#{SFTP_USERNAME}` 的值来参数化 此属性。
将 "Password" 属性配置为所提供用户名的适当密码。通常最好通过将其设置为类似 `#{SFTP_PASSWORD}` 的值来参数化 此属性。
然后将此处理器的 'success' Relationship 连接到 FetchSFTP。
"Hostname" = "${sftp.remote.host}"
"Remote File" = "${path}/${filename}"
"Username" = "${sftp.listing.user}"
"Password" = "#{SFTP_PASSWORD}"
属性
| 名称 | 默认值 | 可选值 | 描述 |
|---|---|---|---|
| Hostname | | 用于从中获取数据的主机的完全限定主机名或 IP 地址 支持表达式语言:是(使用 FlowFile 属性与环境/系统变量求值) | |
| Port | 22 | 连接到远程主机以从中获取数据的端口 支持表达式语言:是(使用 FlowFile 属性与环境/系统变量求值) | |
| Username | | 用户名 支持表达式语言:是(使用 FlowFile 属性与环境/系统变量求值) | |
| Password | | 用户帐户的密码 敏感属性:是 支持表达式语言:是(使用 FlowFile 属性与环境/系统变量求值) | |
| Private Key Path | | 私钥文件的完全限定路径 支持表达式语言:是(使用 FlowFile 属性与环境/系统变量求值) | |
| Private Key Passphrase | | 私钥的密码 敏感属性:是 支持表达式语言:是(使用 FlowFile 属性与环境/系统变量求值) | |
| Remote File | | 远程系统上的完全限定文件名 支持表达式语言:是(使用 FlowFile 属性与环境/系统变量求值) | |
| Completion Strategy | None |
| 指定文件被拉入 Lynxus 后对服务器上的原始文件执行的操作。如果完成策略失败,将记录警告但数据仍会被传输。 |
| Move Destination Directory | | The directory on the remote server to move the original file to once it has been ingested into Lynxus. This property is ignored unless the Completion Strategy is set to '移动文件'. The specified directory must already exist on the remote system if 'Create Directory' is disabled, or the rename will fail. 支持表达式语言:是(使用 FlowFile 属性与环境/系统变量求值) | |
| Create Directory | false |
| Used when 'Completion Strategy' is '移动文件'. 指定如果远程目录不存在,是否应创建该目录。 |
| Disable Directory Listing | false |
| Control how 'Move Destination Directory' is created when 'Completion Strategy' is '移动文件' and 'Create Directory' is enabled. 如果设置为 'true',在创建缺失目录之前不执行目录列表。默认情况下,此处理器在执行创建缺失目录之前会执行目录列表命令以查看目标目录是否存在。但是,在某些情况下您可能需要禁用目录列表,例如以下情况。目录列表可能因某些权限设置(例如 chmod 100)而失败。此外,如果在此处理器执行列表之后和目录创建请求完成之前,任何其他 SFTP 客户端创建了该目录,则会返回错误,因为目录已存在。 |
| Connection Timeout | 30 sec | 创建连接时超时之前等待的时间量 | |
| Data Timeout | 30 sec | 在本地和远程系统之间传输文件时,该值指定允许在系统之间不传输任何数据的时间长度 | |
| Send Keep Alive On Timeout | true |
| 每 5 秒发送一条“保持活动”消息,最多发送 5 次,总超时时间为 25 秒。 |
| Host Key File | | 如果提供,给定的文件将用作主机密钥;否则,如果应用了 'Strict Host Key Checking' 属性(设置为 true),则使用 ~/.ssh 目录中的 'known_hosts' 和 'known_hosts2' 文件,否则不使用主机密钥文件。 | |
| Strict Host Key Checking | false |
| 指示是否应严格执行主机密钥 |
| Use Compression | false |
| 指示传输文件时是否应使用 ZLIB 压缩 |
| Proxy Configuration Service | | 控制器服务 API:ProxyConfigurationServicecn.org.acal.lynxus-lynxus-standard-services-api-nar-2.11.8 | 指定代理配置 Controller Service 来代理网络请求。 |
| Log Level When File Not Found | ERROR |
| 触发处理器时文件不存在时使用的日志级别 |
| Algorithm Negotiation | DEFAULT |
| SSH算法协商配置策略 |
| Ciphers Allowed | | 允许的 SFTP 连接密码的逗号分隔列表。留空以允许所有。可用选项包括:3des-cbc, aes128-cbc, aes128-ctr, aes128-gcm@openssh.com, aes192-cbc, aes192-ctr, aes256-cbc, aes256-ctr, aes256-gcm@openssh.com, arcfour128, arcfour256, blowfish-cbc, chacha20-poly1305@openssh.com, none 支持表达式语言:是(仅使用环境/系统变量求值) | |
| Key Algorithms Allowed | | 允许的 SFTP 连接密钥算法的逗号分隔列表。留空以允许所有。可用选项包括:ecdsa-sha2-nistp256, ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384, ecdsa-sha2-nistp384-cert-v01@openssh.com, ecdsa-sha2-nistp521, ecdsa-sha2-nistp521-cert-v01@openssh.com, rsa-sha2-256, rsa-sha2-256-cert-v01@openssh.com, rsa-sha2-512, rsa-sha2-512-cert-v01@openssh.com, sk-ecdsa-sha2-nistp256@openssh.com, sk-ssh-ed25519@openssh.com, ssh-dss, ssh-dss-cert-v01@openssh.com, ssh-ed25519, ssh-ed25519-cert-v01@openssh.com, ssh-rsa, ssh-rsa-cert-v01@openssh.com 支持表达式语言:是(仅使用环境/系统变量求值) | |
| Key Exchange Algorithms Allowed | | 允许的 SFTP 连接密钥交换算法的逗号分隔列表。留空以允许所有。可用选项包括:curve25519-sha256, curve25519-sha256@libssh.org, curve448-sha512, diffie-hellman-group-exchange-sha1, diffie-hellman-group-exchange-sha256, diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, diffie-hellman-group14-sha256, diffie-hellman-group15-sha512, diffie-hellman-group16-sha512, diffie-hellman-group17-sha512, diffie-hellman-group18-sha512, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, mlkem1024nistp384-sha384, mlkem768nistp256-sha256, mlkem768x25519-sha256, sntrup761x25519-sha512, sntrup761x25519-sha512@openssh.com 支持表达式语言:是(仅使用环境/系统变量求值) | |
| Message Authentication Codes Allowed | | 允许的 SFTP 连接消息认证码的逗号分隔列表。留空以允许所有。可用选项包括:hmac-md5, hmac-md5-96, hmac-sha1, hmac-sha1-96, hmac-sha1-etm@openssh.com, hmac-sha2-256, hmac-sha2-256-etm@openssh.com, hmac-sha2-512, hmac-sha2-512-etm@openssh.com 支持表达式语言:是(仅使用环境/系统变量求值) |
关系 (Relationships)
| 名称 | 描述 | 自动终止 |
|---|---|---|
comms.failure | 由于通信故障而无法从远程服务器获取的任何 FlowFile 将被传输到此关系。 | 否 |
not.found | 我们从远程服务器收到“未找到”消息的任何FlowFile都将被传输到此关系。 | 否 |
permission.denied | 任何由于权限不足而无法从远程服务器获取的 FlowFile 将被传输到此关系。 | 否 |
success | 所有收到的 FlowFiles 都会成功路由 | 否 |
写入的 FlowFile 属性
| 名称 | 描述 |
|---|---|
sftp.remote.host | 从中提取文件的主机名或 IP 地址 |
sftp.remote.port | 用于与远程 SFTP 服务器通信的端口 |
sftp.remote.filename | 拉取的远程文件的名称 |
filename | 文件名更新为指向远程文件的文件名 |
path | 如果远程文件包含目录名称,则该目录名称将使用“path”属性添加到 FlowFile |
fetch.failure.reason | 路由到任何故障关系时应用的故障关系的名称 |
状态管理
该组件不存储状态。
受限 (Restricted)
该组件不受限。
输入要求
该组件要求有传入连接。