# Adding Folder Monitoring Template Besides monitoring files on the systems, you can also monitor folders. You can track changes in folders based on the folder size, the number of files in a folder, etc. Like file monitors, you can be notified if a specific change occurs. For instance, you might want to be notified if the folder size increases beyond a defined limit, or if some files in a folder are missing. Configure meaningful templates in OpManager and apply them to devices on which you want the folders monitored. Monitor the following parameters on folders: [![Folder monitoring in OpManager: How to video](https://www.manageengine.com/network-monitoring/images/file-folder-monitor.jpg)](https://www.youtube-nocookie.com/embed/A0Bfa_XXDDc) - **Folder size:** Watch for an increase or decrease in the file size - **Existence of a file:** Check the availability of a file in the specified directory (may have been moved, renamed, or deleted) - **Folder Modification:** Keep track of any file changes (add/remove/rename) in a folder. - **File Name:** Watch files in a folder by their name. - **File Size/Age:** Check the last modified file or all files in a folder for file size and age. - **File count:** Keep track of the number of files within a folder. This help document covers the steps to configure the following: - [Configure a file monitoring template](https://www.manageengine.com/network-monitoring/help/add-folder-monitoring-template.html#configure-template) - [Configure Thresholds for Folder monitors](https://www.manageengine.com/network-monitoring/help/add-folder-monitoring-template.html#configure-thresholds) - [Configure Alerts for Folder monitors](https://www.manageengine.com/network-monitoring/help/add-folder-monitoring-template.html#configure-alerts) - [Associate the Folder monitor to devices](https://www.manageengine.com/network-monitoring/help/add-folder-monitoring-template.html#associate-folder) ## Steps to Configure a File Monitoring Template 1. Go to **Settings → Monitoring → Folders.** 2. Click **New Template**. The Add New Template window opens. 3. **Template Name:** Configure a name for the template. 4. **Folder Path:** Specify the path in which OpManager should locate the file. You can either provide the local directory (C:) or UNC share path (\\servername\shareddirectory). 5. **Polling Interval:** Configure the interval at which OpManager should monitor the file. 6. **Description:** Provide a brief, meaningful description for the template. 7. If you wish to associate the monitor to existing devices, click **Save & Associate**. This option will prompt you to select the required devices to which the monitor must be associated. Select the required devices and click **Save**. 8. If you wish to only add the monitor (and not associate it to any of the existing devices), click **Save**. ## Configuring Thresholds for Folder Monitors Configure the monitoring criteria for folder/file monitoring conditions based on which you want to be notified: 1. **Folder Existence:** OpManager looks for the folder in the specified path and alerts based on the conditions specified. You can configure to be notified if the folder does not exist in the path specified, be notified if the folder exists, or choose not to monitor. 2. **Folder Size:** Configure OpManager to alert you if the folder size goes over or comes below a specified size. Select the relevant threshold for alerting. You can configure the size in bytes, KB, MB, or GB. Configure the rearm accordingly to reset the alarm. 3. **Folder Modification:** Select the *Alert if modified* checkbox to receive alerts when files/sub-folders are added, deleted, or renamed in the specified folder. 4. **File Filter:** By default, all the files in the specified folder are monitored. Deselect the *All files* checkbox and enter the file name or extension (`*.pdf,*.txt`) of the files you want to monitor. You can enter multiple values separated by a comma, but no blank space is allowed. You can enter the filename in the following formats: - Full file name with extension `stdout.doc,stdlog.txt` - File name with wild characters `*out` or `std*`. Files containing the same prefix or suffix name with same/different extension will be monitored. - File name in date format `2011062200001.txt`. Enter the file name in a static format `$YYYY$MM$DD*.txt` or `$YYYY$DD$MM*.txt` 5. **File Name Contains:** OpManager looks for files in the specified folder and alerts based on the conditions specified. You can configure to be notified if the folder does not contain any file with the specified name, be notified if the folder contains files with the specified name, or choose not to monitor. 6. **File Size/Age:** OpManager looks at either the last modified file or all files for file size and age. If the threshold condition for either file size or file age is violated, an alarm is raised. Configure the relevant threshold and rearm conditions. 7. **File Count:** You can monitor the number of files specified in the File Filter and be alerted if the count changes or if it violates a count threshold. Configure the rearm accordingly to reset the alarm. ## Configuring Alerts for Folder Monitors Configure the following alerting options: 1. **Severity:** Choose the severity that you would like to assign to this alert. 2. **Consecutive Times:** Specify how many times the threshold can be violated to generate the alert. 3. **Alarm Message Format:** Configure the alarm message. You can include alarm variables by appending `$` to the variable name. ## Associating the Folder Monitor to Devices After creating a template with the alert criteria, you can associate the template to devices. 1. Go to **Settings → Monitoring → Folders.** 2. Click **Associate**. 3. Select the required template from the drop-down. 4. Select the devices for which you want to apply this template and move them to the right. 5. Click the **Associate** button at the bottom of the column to associate the template to all the selected devices. The monitor is added to the device, and OpManager alerts based on the configured alert conditions.