Monitoring Folders

(Available in EFT Server Enterprise) EFT Server’s Folder Monitor Event Rule trigger is used to detect the creation, deletion, and renaming of files in a monitored folder and to perform Actions based on these triggers. You can use a Folder Monitor Rule to trigger when files are added to a folder using the network file system. When monitoring folders for files added to EFT Server via the FTP/S and HTTP/S protocols, use File Uploaded, File Downloaded, and other File System Events. Folder Monitor Rules are not fired for Events happening to folders, such as the addition, renaming, or removal of a folder; it only applies to file changes within the folder or subfolders.

The Folder Monitor Rule can pass Unicode filenames to the Advanced Workflow Engine.

Creating a Folder Monitor Rule

EFT Server keeps track of the number of active threads over time and periodically calculates the average number of concurrent active threads over that time period. The sample rate is once every 5 seconds, and the sample period is 10 samples. After sampling 10 times and finding the average concurrent active threads over that period, the system can grow the pool of the concurrent active threads, up to a set maximum number of threads. This means that if EFT Server is currently running close to or above the prior average of concurrent threads, it will grow the thread pool to allow for room for more Events. By default, EFT Server starts with 3 threads in the pool per Site, and can grow to a maximum of 32 threads.

EFT Server will only reset affected (modified) folders when applying configuration changes to an Event Rule, rather than resetting all folders.

icon_info.gif

When monitoring a folder, EFT Server watches for any file being added to, removed from, or renamed in the monitored folder. Moving a file, performing PGP operations, and other Actions can trigger the Rule again, resulting in failures. This can be avoided by selecting the Stop processing this rule check box after if action failed then.

To configure a Folder Monitor Rule

  1. Follow the procedures in Defining Event Rules.

  2. In the Create New Event Rule dialog box, click Folder Monitor, then click OK.

    db_createneweventrulefoldermonitor.png

    The new, blank Rule appears in the Rule Builder.

    illust_rulebuilder_foldermonitor.png

  3. In the Monitor folder Event, click [select]. The Monitor Folder dialog box appears.

    db_monitorfolder64.png

  4. Next to the Folder box, click the folder icon  to specify a folder to monitor.

    icon_info.gif

    To monitor a folder on a remote, non-EFT Server FTP server, supply the full UNC path to the network share. (The format for a UNC path is \\server\volume\directory and is not case-sensitive. For example: \\Shared1_svr\Shared1\WGroups\Network). Make sure that the EFT Server service has sufficient privileges to perform READ operations on the remote share. If you are using the "health check" feature, it must also have WRITE permissions. This is generally easiest if you set the EFT Server service to run as a domain account, or specify a dedicated “run as” account in the Monitor Folder dialog box. Wildcards are not supported.

  5. If you also want to monitor subfolders, select the Include subfolders check box. For example, if you are monitoring a user folder and the user has created subfolders, unless you select the Include subfolders check box, files added to or changed in subfolders do not trigger the Rule.

  6. If login credentials are required to access the folder and subfolders, select the Use the following credentials to access the monitored folder check box, then specify the username and password.

    icon_info.gif

    The Microsoft definition of noninteractive login states: “Noninteractive authentication can only be used after an interactive authentication has taken place. During noninteractive authentication, the user does not input logon data, instead, previously established credentials are used. Noninteractive authentication is the mechanism at work when a user connects to multiple machines on a network without having to re-enter logon information for each machine.” In this case, EFT Server has joined the domain and/or the Server service runs as a domain user. You could supply different credentials to run as a different user for this Action.

  7. The Require Active Directory domain trust relationship check box specifies how the Folder Monitor Event Rule will log in to monitor remote folders. Selecting this check box indicates that Folder Monitor must establish a "trustful" connection to the system containing the folder(s) being monitored. This control is not enabled unless the Use the following credentials to access the monitored folder check box is selected. (Please also refer to the note above regarding this check box.)

  8. In the Triggers area, select the Trigger based on folder change notifications check box to cause Events to be set off by the receipt of directory change notifications (add, delete, and rename) generated by the system.

  9. To monitor the status of the network connection and report failures, select the Perform health check every check box, and specify an interval. An hour (60 minutes) is specified by default.

    When the check box is selected, EFT Server periodically writes a special file to the folder specified and then waits for the "file added" notification to verify that it can receive notifications of changes within the folder. When there is a loss of connectivity, EFT Server attempts to re-establish a link to the folder and triggers the Folder Monitor Failed Event internally. If you want to receive e-mail failure notifications (or other Actions) when the Folder Monitor health check returns a connection failure, create an additional Event Rule using the Folder Monitor Failed Event, and add the Send notification e-mail Action to it.

    icon_info.gif

    The time EFT Server waits for the notification from Windows when a Folder Monitor health check file is created can be controlled by a registry value. Refer to the knowledgebase article at http://kb.globalscape.com/KnowledgebaseArticle10682.aspx.

  10. To enable Folder Sweep, select the Scan for files every check box and specify the frequency. The default is 30 minutes. A value between 1 and 9999 can be specified with units of seconds, minutes, or hours. The timer for the next sweep cycle is not started until all the files for the current sweep cycle have processed through all Event Rule Actions. Folder Sweep limits its processing to 1000 files at a time. If the monitored folder contains more than 1000 files, up to 1000 of the remaining files will be processed during the next sweep cycle. Selecting the Scan for files every check box will cause a Folder Monitor scan upon Event Rule start up (such as when you create the Rule and then click Apply). If you have Actions in the Rule, such as an e-mail notification, those Actions will be triggered. (This check box is not selected by default.)

  11. All files in a monitored folder will be processed every sweep cycle so if a user neglects to remove processed files; or if a Rule Action that was supposed to remove the file fails, the file will be reprocessed. In the Post Processing area, select the Once all actions are completed, archive any files still present in the monitored folder to avoid reprocessing check box, and then specify the name of the folder in which to archive any remaining files. The default is EFTArchive. The Archive subfolder will reside directly under the folder in which the file was added. The Archive subfolder name cannot contain any of the following characters:  | /  \ ? * < " : > + [  ] and is limited to 248 characters (total cannot exceed Windows path limit).

  12. Click OK. If the Once all actions check box is selected and an invalid name or no name is given for the Archive subfolder, it will revert to the default name (EFTArchive) and a warning message appears.

  13. The If File Change Condition is added automatically to restrict the triggering of the Rule. Click the links in the If File Change Condition to specify whether the Rule should trigger when a file in the folder is or is not renamed, added, or removed. If Folder Sweep is enabled (as described above), the If File Change Condition is forced to "does equal to added," because Folder Sweep only applies to files added to a folder or subfolders.

  14. Specify any Action/Conditions to occur when this Event is triggered:

  15. Click Apply to save the changes on EFT Server.