Creating a directory monitor

Top  Previous  Next

To access Directory Monitors information, click on the AUTOMATION > Directory Monitors > module for the desired domain. You will see three tabs, Directory Monitors, Events, and Settings. Directory Monitors is the active tab by default. It lists all the directory monitors that have been created in the domain.

 

Figure 81

 

clip0081

 

 

Directory monitors can monitor local directories, UNC paths, and even certain types of trading partners, if the trading partner allows for a directory listing. Trading partners supported include: AFTP, Agent, Amazon S3, Box, Dropbox, FTP, FTPS explicit/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 OneDrive, POP3, SFTP/SCP, SMB, and WebDAV.

 

View Triggers - The View Triggers button will list any triggers (AUTOMATION > Triggers >Triggers) applicable to the currently selected directory monitor. Triggers allow for conditions, where you can specify directory monitor name(s) that the trigger applies to. Any triggers that use the currently selected directory monitor in the Trigger Conditions expression (for example, MonitorName = "MonitorDirA"), will appear in the list.

 

To add a directory monitor click on the Add button in the lower right-hand corner of the Directory Monitors grid. Alternatively, you can right-click in the grid area and select Add from the context menu. The Add Directory Monitor wizard will be displayed, as per the image below.

 

Monitoring local directories and UNC paths

 

To monitor a local directory or UNC path, leave the Use trading partner checkbox unchecked and enter a directory path to monitor (or navigate to the directory itself using the Browse button).

 

Figure 82

 

clip0082

 

 

Monitoring Trading Partners

 

To monitor trading partners, tick the check box labeled 'Use trading partner' and then select a trading partner from the drop-down list.

 

Basic

 

Name - Unique name you wish to assign to this directory monitor.

 

Directory - The directory you wish to monitor.

 

Monitor recursively - If checked server will monitor all files in this directory and sub-directories when calculating disk usage against quotas and looking for changes (e.g. new files, deleted files etc.).

 

Settings

 

Monitor interval (sec) - The optional frequency in seconds that you wish to check directory for changes.  If not enabled then you may run the directory monitor on a scheduled basis using a Current Time event trigger and Run Directory Monitor action or manually from the Directory Monitors module.

 

Note: When testing a newly created directory monitor, give the monitor ample time to take an initial snapshot of the directory contents before making any changes, e.g. adding a new file. The recommended duration is: monitor interval + 10 seconds. Once this initial duration has passed, you can then proceed adding and removing files for testing.

 

Latency period (sec) - If file has been modified within defined latency period then directory monitor event will not be fired.  This option may be used to prevent responding to a directory monitor event on a file that is in process of being written.

 

Owner - Sets the owner for this directory monitor for use in displaying disk quota information via the web interface.

 

Enable quota (Mb) - The maximum amount of data that may be stored in this directory.

 

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

 

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

 

Events

 

Monitor file add - Fire a Directory Monitor File Added event whenever a file is added to this directory.

 

Monitor file change - Fire a Directory Monitor File Changed event whenever a file in this directory is changed.

 

Monitor file delete - Fire a Directory Monitor File Deleted event whenever a file in this directory is deleted.

 

File exceeds age of N [minutes | hours | days] - Fire a Directory Monitor File Aged event whenever a file in this directory exceeds age of N minutes, hours, or days, whichever time frame is selected from the drop-down. When this option is checked, the default is 1 day.

 

Raise an event if monitor idle - If the directory monitor has not been raised (active) for the configured amount of time (minutes, hours, days), you can create a trigger that monitors for this type of event. The event type is Directory Monitor Idle. This can be 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 event type could be Send Email, if the intent is to notify interested parties that the monitor has been idle.

 

Raise events on First/All Instance(s) - This field applies to MFT servers that are configured using an Active/Active high availability (HA) solution. If First is selected, the first server in the cluster (the active MFT Server) will listen for directory monitor events. If the active (First) server should go down, the other server in the queue will automatically listen for directory events. This is to avoid duplicate events when using a cluster. If All is selected, all servers in the Active/Active cluster will listen for directory monitor events. Note: When MFT Server HA is configured using an Active/Passive configuration - only First is applicable.

 

Tags

 

Tags - Use tags to limit the administrators that may have access to this directory monitor.

 

Once the directory monitor has been created, you can capture any changes made to the directory using triggers and events.  The available events for a directory monitor include Directory Monitor File Added, Directory Monitor File Changed, Directory Monitor File Deleted, Directory Monitor File Aged, Directory Monitor Created, Directory Monitor Updated, Directory Monitor Deleted, Directory Monitor Idle and Directory Monitor Quota Exceeded.  See the user documentation on triggers for more information on how to capture and respond to these events.

 

Events tab

 

To view a list of directory monitor events that have occurred, click on the Events tab.

 

Figure 390

 

clip0390

 

Included in the Events grid is the system generated Event ID, the Directory Monitor name, the Path of the directory being monitored and the file name associated with the event, the Date (and time) the event occurred, and the Event type.

 

Purge - This option removes all event records from the table on demand. Purging is also automated based on a Settings option described below. When selected, you will be prompted to purge all directory monitor events that are older than the specified number of days. This option is designed to prevent the database table from growing too large.

 

Raise - This option allows you to raise a directory monitor event on demand. This option is not applicable to existing events in the list. This action will create a new Event ID. Its primary use is to test work flows (Triggers) you have configured that execute when the event occurs. There may be other reasons outside of testing that you may find this feature useful. When this option is selected, a new window will appear named Raise Directory Monitor Event. Below are the three fields you will see in this window.

 

Directory Monitor - The directory monitor to raise. The default directory monitor will be the one that comes first alphabetically, based on the names you have assigned to your directory monitors. To select a different directory monitor, use the field's drop-down arrow and click on the desired monitor.
Path - The path to monitor for the file event. By default, the path that is currently configured for the selected directory monitor will be displayed. You have two options for this field, you can keep the default directory, or you can select a subdirectory within the default directory.
Event - The type of event you wish to have occur (e.g. File Added, File Changed, etc.). By default, Directory Monitor File Added is the event type, which may or may not be one of the events configured for the selected monitor. To choose a different event type, click on the drop-down list and click on the desired option.

 

Reraise - This option allows you to reraise an existing directory monitor event on demand. This action will create a new Event ID. Select the desired event in the grid. Click on the Reraise button (or right-click to select the option from the context menu). You will be prompted to confirm the action, and you can optionally check the "Maintain date and time event variables" checkbox. When checked, the date and time event variables from the original event will be used. Any Triggers that are configured to execute as a result of the event occurring will execute again.

 

Note: When any of the three above actions are used (Purge, Raise and Reraise), a record is added to the Settings > MANAGER SERVICE > Logs > Records grid for audit purposes.

When a purge is performed, the Logs > Records > Action column will display "directory monitor events purged".

When a raise or reraise option is performed, the Logs > Records > Action column will display "directory monitor event risen".

 

Settings tab

 

Max threads - specifies the maximum number of directory monitor threads that can run simultaneously

 

When they are running, each directory monitor runs on a separate thread. The Max threads setting specifies the maximum number of directory monitor threads that can run simultaneously. Note that directory monitors don't run all the time. A directory monitor only runs when prompted or at the time specified in the Monitor interval setting. So, in most cases, only a few directory monitors (if ever) will have to run simultaneously.

 

In the unlikely event that multiple directory monitors are activated at the same time and the number of threads required exceeds the Max threads value, some of the directory monitors will have to wait until a thread(s) become available.

 

Clear records older than X day(s) - This will clear all the event records that are older than the days value entered. The default value is 30.

 

Figure 272

 

clip0272

 

 

See also

 

Trigger management

Event types





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2023 Redwood Software, Inc.