# SFTP Monitor

**SFTP (Secure File Transfer Protocol) Monitor** is used to monitor and manage files transfer over SFTP servers. It is designed to keep track of file transfers over SFTP.

All component configurations are classified broadly into the following sections:

* ​[​Basic Information​](https://docs.bdb.ai/data-pipeline-5/components/component-base-configuration)​
* Meta Information
* ​[Resource Configuration​](https://docs.bdb.ai/data-pipeline-5/components/resource-configuration)​
* ​[Connection Validation](https://docs.bdb.ai/7.6/data-pipeline/components/connection-validation)

## Please follow the below demonstration to configure SFTP Monitor component.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fuq3RSHHup7fjHYaspk7y%2Fuploads%2F7oiEBh2CLqHJw7ktuRP0%2Fsftp%20monitor%20(online-video-cutter.com).mp4?alt=media&token=c74b1c8f-b976-4f28-8570-d302789bd2dc>" %}

## **Steps to configure the SFTP Monitor Component** <a href="#steps-to-configure-the-sftp-monitor-component" id="steps-to-configure-the-sftp-monitor-component"></a>

* Drag and Drop the SFTP Monitor consumer component which is inside the consumer section of the system component part to the Workflow Editor.
* Click the dragged ingestion component to get the component properties tabs.

![](https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2F4pjO8jAdoIaA3nfh9m48%2Fimage.png?alt=media\&token=b20aa402-b5fd-4194-bbbc-fc549d113117)

### Basic Information Tab <a href="#basic-information-tab" id="basic-information-tab"></a>

The **Basic Information Tab** is the default tab for the component.

* Select the I**nvocation Type** (at present only the ***Real-Time*** option is provided).
* **Deployment Type:** It comes preselected based on the component.
* **Container Image Version**: It comes preselected based on the component.
* **Failover Event**: Select a failover event from the drop-down menu.
* **Batch Size** (min 10): Provide the maximum number of records to be processed in one execution cycle (Min limit for this field is 10).

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FPYVed86QgHR73FjLDxrJ%2Fimage.png?alt=media&#x26;token=5ffb8f24-d115-424e-80e5-04efa058f24b" alt=""><figcaption></figcaption></figure>

### Meta Information Tab <a href="#meta-information-tab" id="meta-information-tab"></a>

Configure the **Meta Information** **tab** for the dragged SFTP Monitor component.

* **Host**: Broker IP or URL
* **Username**: If authentication is required then give username
* **Port**: Provide the Port number
* **Authentication**: Select an authentication option using the drop-down list.
  * **Password**: Provide a password to authenticate SFTP Monitor.
  * **PEM/PPK File**: Choose a file to authenticate the SFTP Monitor component. The user needs to upload a file if this authentication option has been selected.
* **Directory Path**: Fill the monitor folder path using forward-slash (/). E.g., **/home**/**monitor**
* **Copy Directory Pat**h: Fill in the copy folder name where you want to copy the uploaded file. E.g., /**home**/**monitor\_copy**

{% hint style="info" %}
*<mark style="color:orange;"><mark style="color:green;">Please Note:<mark style="color:green;"></mark>* *<mark style="color:orange;">**Don't**</mark>**&#x20;use a nested directory structure in the directory path** and **copy directory path**. Else the <mark style="color:orange;">component won't behave in an expected manner</mark>.*&#x20;

*<mark style="color:orange;">**Don't**</mark>\*\* \*\***use the dirpath and copy-path as follows:** dirpath: home/monitor/datacopy-dir:home/monitor/data/copy\_data*
{% endhint %}

* **Channel**: Select a channel option from the drop-down menu (the supported channel is SFTP).

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FlegEo7VHLmQoAdFp0X15%2Fimage.png?alt=media&#x26;token=b5aaf7fa-dda8-470f-941b-df42cd010acf" alt=""><figcaption></figcaption></figure>

#### **Meta Information Fields when the Authentication option is Password**

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FePyYTmO81AcjsRZpYtWo%2Fimage.png?alt=media&#x26;token=8933f12d-09e9-48fa-87e1-f350440b90fc" alt=""><figcaption></figcaption></figure>

#### **Meta Information Fields when the Authentication option is PEM/PPK**

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2F6Nq25X6L1L8JKHIynoN9%2Fimage.png?alt=media&#x26;token=bdc416c8-a66f-496a-860d-e3740de48606" alt=""><figcaption></figcaption></figure>

### Saving the Component Configuration <a href="#saving-the-component-configuration" id="saving-the-component-configuration"></a>

* Click the ***Save Component in Storage*** icon to save configured details of the SFTP Monitor component.

&#x20;       ![](https://content.gitbook.com/content/6ZP8JhQPMmuTgMyLMcCU/blobs/GJUisIxSDejicO0WWoPS/image.png)​

* A notification message appears to confirm the same.

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark>*

*a. The SFTP Monitor component monitors the file coming to the monitored path and copies the file in the Copy Path location for SFTP Reader to read.*

*b. The SFTP Monitor component requires an Event to send output.​*

*c. The SFTP Monitor send the file name to the out event along with **File size, last modified time** and **ingestion time** (Refer the below image).*

*&#x64;**.** Only one SFTP monitor will read and move the file if multiple monitors are set up to monitor the same file path at the same time.*
{% endhint %}

<figure><img src="https://content.gitbook.com/content/6ZP8JhQPMmuTgMyLMcCU/blobs/2KFSBqvw4l3gdeXm4oTo/MicrosoftTeams-image%20(106).png" alt=""><figcaption><p>Out Event data preview for SFTP Monitor</p></figcaption></figure>
