Directory Event Monitor
Learn How to Monitor Directories and Subdirectories with Precision
About the Directory Event Monitor

The Directory Event Monitor (not to be confused with the Active Directory Event Monitor) keeps track of a specified directory on a remote machine. It can alert based on the number of files present, the total number of files, and the total size of all files. Optionally, it can also check for the presence of the directory. Lastly, it can monitor the size of the files that are present and alert if the total amount of space changes by a specified amount.

To view this tutorial in video form, view our Screenshots and Videos page.

Getting Started

The Directory Event Monitor uses tokens in the same way as our File Event Monitor. When adding multiple devices, use the token [devicename] in the UNC path instead of the actual name of the device. When the event monitor runs, it will swap out the [devicename] token for each of the devices you have selected.

Note that the Directory Event Monitor differs from the File Event Monitor in a few key ways. Use the File Event Monitor if your goal is to monitor specific files and their contents.

Directory Field

Directory Event Monitor Options

The first option will notify you with your choice of alert level if the device cannot be contacted. The second option alerts if the directory is either missing or present when the event monitor runs.

Alert Options

The next few options deal with the content of the directory and the size of the files. You can be alerted if the directory contains more or less than a specified amount of files. Under the same option, you can choose to be alerted if the directory contains or does not contain a specific amount of files; Perhaps you want your directory to contain exactly 500 files at any given time, no more and no less. Turn on this option to be alerted if that number changes at all.

Underneath this option, you can choose to be alerted about the number of subdirectories the event monitor detects after it runs. You can also alert based on the size of the data found in the directory.

Options to Alert Based on Directory Content

There is an option to alert if the size of the files changes, increases, or decreases. You can also monitor changes by percentage. This helps you keep track of changes to files over time that otherwise may fly under the radar.

More Options

With any event monitor, you aren't obligated to provide values for all four alert levels. If you are only concerned with info and warning levels, for example, leave the error and critical levels blank.

You can also specify file sizes that will trigger alerts. You can choose to be alerted if any one file or all files combined reach a specified size. This lets you keep track of disk space before your files become unmanageable. The reverse option also exists, in which you can be alerted if the size of your files becomes smaller than a specified size.

Changes in File Sizes Alert Option

Another way to keep track of your files is to be alerted if files are newer or older than the period of time that you specify. You can set alerts this way for any or all files. There's a third option that lets you designate a number of new or old files that will trigger an alert.

File Age Alert Option

Designate an alert level for when a file is added or removed to be notified of the addition or removal of any file in the directory.

Alert Options for Addition or Removal of Files

To also scan directories nested within the one you have selected to monitor, check the box that says "For tests in this section, scan subdirectories too". When this option is enabled, a text box will appear that allows you to exclude certain subdirectories. Without this option enabled, all subdirectories will be excluded by default.

The next two options will include or exclude only files that match a filter you designate.

File Filters

For monitoring some types of shared folders, especially on Windows domain controllers, the connection must be established using the hostname. Select the next option to tell the event monitor to use the hostname instead of the IP address.

Hostname Option

Date and Time Tokens

With the "Enable date/time tokens in the file name" box checked, you can use tokens to log files based on date or time. The event monitor will replace the tokens with the current date and time automatically when it runs. It doesn't matter what month/day/year format your files use, as there is a token for each one.

For example, if your target file changes daily from "event-log-2020-09-31" to "event-log-2020-10-01", you would simply replace those dates in the file path with tokens. It would become "event-log-%%YYYY%%-%%MMZ%%-%%DDZ%%". Note that in this example, the file's dating system uses a four-digit year and single-digit months and days are preceded by a zero. The corresponding tokens were used, which is important for proper file detection. We've included a list of all date and time tokens below for your convenience.

Table of Date and Time Tokens


Once your options are set, you can begin monitoring your directories and subdirectories! This tutorial showed you how to start setting up a Directory Event Monitor, including how to monitor by percentage change, file size, recency, and other parameters. Refer to our Directory Event Monitor reference guide for more documentation on this event monitor. Keep an eye on our Features page for new tutorials soon!

More IT Monitoring Features