Creating a directory monitor
|Top Previous Next|
To access Directory Monitors information, click on the Directory Monitors node for the desired domain. You will see three tabs, Directory Monitors, Events, and Settings. Directory Monitors is the active tab by default, and it lists all the directory monitors that have been created in the domain.
To add a directory monitor click on the Add button in the lower right-hand corner. Alternatively, you can right-click in the grid area and select Add from the context menu. The Add Directory Monitor wizard will be displayed.
Directory monitors can monitor local directories, UNC paths, and even certain types of trading partners. The following types of trading partners are supported AFTP, WebDAV, Amazon S3, SFTP, SMB, and FTP/S.
Monitoring local directories and UNC paths
To monitor a local directory or UNC path, leave the 'Use trading partner' checkbox un-ticked and enter a directory path to monitor (or navigate to the directory itself using the Browse button).
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.
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.).
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.
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.
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 Updated and Directory Monitor Quota Exceeded. See the user documentation on triggers for more information on how to capture and respond to these events.
To view a list of directory monitor events that have occurred, click on the Events tab.
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.
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, a record is added to the Settings > Manager Service > Logs table for audit purposes.
When a purge is performed, the Logs Action column will display "directory monitor events purged".
When a raise or reraise option is performed, the Logs Action column will display "directory monitor event risen".
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.