Working With Directory Monitors

To access the Directory Monitors module, navigate to [Domain] > AUTOMATION > Directory Monitors. The Directory Monitors tab is active by default. It displays a grid of Directory Monitors.

 

Directory Monitors watch for directory changes, and when a change occurs, an event is raised. Triggers listen for raised Directory Monitor events, and when that happens, the Trigger executes (providing Trigger Conditions are met, if any are configured). A Trigger consists of one or more Actions that run as a result of the directory change. This allows for an automated response to directory changes.

 

 

Buttons

 

You can access the same features listed below with a right-click operation.

 

Add — Displays the Add Directory Monitor dialog used to add a new Directory Monitor

 

Edit — Displays an Edit [Monitor Name] Directory Monitor dialog used to edit the currently selected Directory Monitor

 

Run — Forces a check of the directory being monitored to see if there are any file changes (files added, deleted, etc.)

 

Delete — Deletes the currently selected Directory Monitor

 

View Triggers — Lists all Triggers (AUTOMATION > Triggers >Triggers) associated with the currently selected Directory Monitor. When selected, a Directory Monitor [Monitor Name] Triggers dialog displays. If the currently selected Directory Monitor has any Triggers associated with it, they are displayed in the dialog.

 

View Triggers — Executes a partial match search for Triggers that use the currently selected Directory Monitor Name in a Trigger Condition Expression (AUTOMATION > Triggers >Triggers > Add/Edit > Conditions). The Trigger Condition Expression is MonitorName = [Directory Monitor Name]. The View Triggers search returns Triggers where MonitorName = the currently selected Directory Monitor's Name. A partial search match means that the currently selected Directory Monitor Name matches the [Directory Monitor Name] in a Trigger Condition, even if there are additional characters before and after it.

 

The results are returned in the Directory Monitor [Monitor Name] Triggers window.

In the image below, TestMonitor is the currently selected Directory Monitor. When the View Triggers button is clicked, the Directory Monitor TestMonitor Triggers dialog displays. In this example, one trigger named TriggerTest is using MonitorName=TestMonitor in its Trigger Condition.

The images in the example below are taken from [Domain] AUTOMATION > Triggers > Triggers > Add | Edit > Parameters and [Domain] AUTOMATION > Triggers > Triggers > Add | Edit > Conditions.

 

MonitorName is only allowed in a Condition Expression when the Trigger is configured with a Directory Monitor Event type, such as Directory Monitor File Added, or Directory Monitor File Changed.  

 

Trigger > Parameters Event type and Trigger > Conditions Expression




If a Trigger Condition includes a MonitorName expression, the Trigger will only execute when the specified Directory Monitor raises the corresponding event that the Trigger is set to listen for.

 

If a Trigger is configured with a Directory Monitor Event type (see the full list below), and the Conditions > Expression MonitorName=["Directory Monitor"] is not configured, the Trigger executes if any Directory Monitor raises the Directory Monitor Event type the Trigger is listening for.  

 

Directory Monitor Trigger Event types:

 

  • Directory Monitor Created

  • Directory Monitor Deleted

  • Directory Monitor File

  • Directory Monitor File Added

  • Directory Monitor File Aged

  • Directory Monitor File Changed

  • Directory Monitor File Deleted

  • Directory Monitor Idle

  • Directory Monitor Updated

  • Directory Monitor Quota Exceeded

  • Directory Monitor Failure

 

Next, when you right-click on a record in the Directory Monitors grid, an Events option displays in the dropdown list. When Events is selected, focus changes to the Events tab depicted in the topmost image. When Events are accessed this way, you only see Events associated with the currently selected Directory Monitor. MFT Server accomplishes this by setting the built-in search feature in the Events tab.

 

Directory Monitor dialog — The fields are described below.

 

 

BASIC

 

Name — Identifies a unique name to assign to the Directory Monitor.

 

Use trading partner — Select this checkbox to monitor the directory of a Trading Partner. If selected, choose a Trading Partner from the dropdown list. If Use trading partner is not selected, the Directory specified must be accessible to MFT Server (a local directory or UNC path).

 

Trading Partners supported:

 

  • AFTP

  • Agent

  • Amazon S3

  • Box

  • Dropbox

  • FTP

  • FTPS Explicit

  • FTP Implicit

  • Google Cloud Storage

  • Google Drive

  • IBM Cloud

  • Local Directory

  • MFT REST

  • Microsoft Azure Blob Server

  • Microsoft Data Lake

  • Microsoft Azure Data Lake Gen2

  • Microsoft Azure File Service

  • Microsoft Azure/OneDrive/SharePoint

  • POP3

  • SFTP/SCP

  • SMB

  • WebDAV

 

Directory — Identifies the directory to monitor. Enter the path to monitor, or navigate to the directory using the browse feature, which is accessed by clicking on the ellipsis "...".

 

MFT Server installed on a Windows system can monitor:

 

  • Its local directories. For example - C:\MFTServer\MonitorDir

     

  • Directories accessible to MFT Server via a Windows UNC share. For example - \\winservername\sharename

     

  • Directories accessible to MFT Server via a Linux/Unix Samba share. For example - \\linuxservername\sharename

 

MFT Server installed on a Linux/Unix system can monitor:

 

  • Its local directories. For example - /MFTServer/MonitorDir

     

  • Directories accessible to MFT Server via a Linux/Unix mounted NFS client. For example - /mnt/nfs_client

     

  • Directories accessible to MFT Server via a Linux/Unix Samba share. For example - /mnt/smbshare.

 

The Browse feature does not work for Samba or Windows shares. You must manually enter the share name in the Directory field.

 

When MFT server is monitoring a share for directory changes, you have the option to specify an SMB Trading Partner, as opposed to referencing the share name in Directory field. The SMB Trading Partner is where the share's server name is configured. To implement this, create the SMB Trading Partner. Next, select the "Use trading partner" checkbox in the Add Directory Monitor dialog, then select the desired SMB Trading Partner from the dropdown list. Finally, enter the directory name to monitor in the Directory field.

 

Monitor recursively — If selected, MFT Server monitors files in the specified directory and sub-directories, when calculating disk usage against quotas and watching for file changes.

 

SETTINGS

 

Monitor interval (sec) — Identifies the frequency in seconds to check for directory changes. If not selected, you can run the Directory Monitor on a schedule using a Trigger configured with a Current Time Event type and a Run Directory Monitor Trigger Action. You can also run the monitor manually by clicking on the Run button in the Directory Monitors module.

 

If the Monitor interval field is unselected, then later reselected, any Directory Monitor event type (file add, file change, etc.) that occurred during the unselected period is processed. For example, if two files arrive in a monitored directory when the Monitor interval checkbox is unselected, they are processed when the checkbox is reselected.

 

When testing a newly created Directory Monitor, allow the Monitor time to take an initial snapshot of the directory contents before making any changes, such as adding a new file. The recommended duration is Monitor interval + 10 seconds. Once this initial duration has passed, you can add and remove files for testing.

Latency period (sec) — Identifies a latency period such that if a file has been modified within that period, the Directory Monitor event is not fired. This option is used to prevent a Directory Monitor event from firing when information is still being written to the file.

 

Owner - Identifies the owner of the Directory Monitor. This is used when displaying disk quota information via the web interface.

 

Enable [soft, hard] quota of X [MiB, GiB] — Identifies the maximum amount of data that may be stored in this directory.

If soft quota is selected and the quota is exceeded, file transfers to this directory are still allowed. However, a Directory Monitor Quota Exceeded event is fired, which can be used to notify an administrator of the issue.

 

If hard quota is selected, file transfers to this directory are no longer allowed once the quota is exceeded.

EVENTS

 

Monitor file add — Raises a Directory Monitor File Added event when a file is added

 

Monitor file change — Raises a Directory Monitor File Changed event when a file is changed

 

Monitor file delete — Raises a Directory Monitor File Deleted event when a file is deleted

 

Monitor failure — Raises a Directory Monitor Failure event

Failures could be for various reasons, such as the directory specified is invalid, or the user attempting to write a file to the monitored directory lacks the necessary permissions.

File exceeds age of X [day(s), hour(s), min] — Runs a Directory Monitor File Aged event when a file exceeds an age of X minutes, hours, or days, based on the time interval selected from the dropdown list. When this option is selected, the default time interval is one day.

 

Raise an event if monitor idle X [day(s), hour(s), min] — If the Directory Monitor has not been raised (active) for the specified amount of time (days, hours minutes), you can create a Trigger that monitors for this type of event. The Trigger Event type is Directory Monitor Idle. This is useful if it would be unusual for a monitored directory not to have any file changes during the specified amount of idle time. One possible Trigger Action tied to this Trigger Event type could be Send Email, if the intent is to notify interested parties that the Directory Monitor has been idle.

 

Raise events on [first, all] Instance(s) — This option applies to MFT servers that are configured using an Active/Active high availability (HA) solution.

first — If selected, the first server in the cluster (the active MFT Server) listens for Directory Monitor events. If the active (first) server should go down, the other server in the queue automatically listens for directory events. This is to avoid duplicate events when using a cluster.

 

all — If selected, all servers in the Active/Active cluster listen for Directory Monitor events. When MFT Server HA is configured using an Active/Passive configuration, only the first option is applicable.

Tags

 

Tags — Identifies tags used to limit administrator access rights to the Directory Monitor.