FTP Watch Publisher

The FTP Watch publisher monitors activity on an FTP server, and publishes messages about that activity to FME Server topics. Activity can include adding, changing, and removing files.

Note: Notifications about changed files are based on file size. Therefore, if the size of a file after it is overwritten is the same as the initial size, a notification may not be sent.

Configuring the Publisher

  1. In the FME Server Web User Interface, select Notifications > Publications, and click New.
  2. Provide a name for the Publication
  3. Protocol: Select FTP Watch.
  4. Specify the Topics you want to publish to using the drop-down selector. To create a topic and use it right away, click +.
  5. Complete the remaining fields as follows:
    • Host – The FTP host name. For example, ftpserver.com.
    • Port – The FTP port number. The default for unencrypted connections is 21.
    • Username – The FTP user name for authentication.
    • Password – The FTP user password for authentication.
    • Encryption – The encryption protocol, depending on the FTP server connection requirements. Options are None, FTPS and FTPES.
    • Verify SSL Certificate - If Yes, the connection to the specified host is verified with a valid, signed SSL certificate. If No, the connection is not verified with an SSL certificate. This option is not secure and not recommended unless absolutely necessary, such as using a self-signed certificate.
    • Connection Type - The FTP connection mode. Passive Mode requires your FTP server to create connections using port numbers greater than 1023. Active Mode uses only ports 20 and 21 on the FTP server.
    • Path to Watch - Specify a location on the FTP server to watch for changes, using forward slashes. For example, /this_directory.
    • Watch Subdirectories - To watch activity in the specified Path to Watch and all subdirectories, specify Yes. To watch activity only in the specified Path to Watch and not in its subdirectories, specify No.
    • Note: Notifications may be delayed if Watch Subdirectories is Yes, and includes a large number of subdirectories. The scale of the delay depends on the number of subdirectories, the FTP server type, and where the FTP connection originates.

    • Poll Interval - Specify how often to poll the FTP server, in minutes.
    • Note: Changes to existing files require an additional poll interval, after the upload completes, before a notification is sent.

    • Filter - By default, all actions on the specified directory are monitored, including adding (CREATE), changing (MODIFY), and deleting (DELETE) files (and folders, if applicable). To monitor only one or two of these actions, click the "x" beside the action you do not want to monitor to remove it. To add an action after removing it, click inside the dropbox and select it.
  6. Click OK.

Sample Notification Schemas

When a file is deleted

{

"ftpwatch_username": "anonymous",

"ftpwatch_host": "odan",

"ftpwatch_action": "DELETE",

"ftpwatch_path": "/log.txt",

"fns_type": "ftpwatch_publisher"

}

When a file is changed (for example, added content)

{

"ftpwatch_username": "anonymous",

"ftpwatch_host": "odan",

"ftpwatch_action": "MODIFY",

"ftpwatch_path": "/log.txt",

"fns_type": "ftpwatch_publisher"

}

When a file is added

{

"ftpwatch_username": "anonymous",

"ftpwatch_host": "odan",

"ftpwatch_action": "CREATE",

"ftpwatch_path": "/log.txt",

"fns_type": "ftpwatch_publisher"

}