<< Click to Display Table of Contents >> Navigation: Introduction > Creating Alerts and Reports > Conditional Alerts > Alert Conditions > Folder Alert Conditions |
|
Folder Alert Conditions
A Folder Alert Condition is used in a Conditional Alert to determine when and how the alert is triggered. You select a windows folder on the file system and then select which types of parameters and conditions you would like the system to use to monitor that folder (see below). You can create as many Folder Alert Conditions as you like for each alert.
In the Create / Edit Conditional Alert window you can add a Folder Alert Condition by clicking the + Folder Condition button on the toolbar. To edit an existing condition you can click the
|
---|
|
First Thing - Choose the Folder To Monitor
Choose the folder you wish to monitor by clicking the browse for folder button
After choosing the folder you need to decide which conditional scenario you would like this alert condition to monitor. There are 3 different scenarios to choose from: 1.Trigger the alert condition only if the folder is not found. 2. Trigger the alert condition based on the number of files in the folder. 3.Trigger the alert based on the AGE of the oldest or newest file in the folder.
|
---|
|
Scenario 1. Only Trigger if the Folder Does Not Exist.
Just check the #1 This condition ONLY evaluates whether folder exists or not box and set the Trigger threshold time period at the bottom of the screen.
What is the benefit of using this condition?
Consider this real world situation. You have a process which requires that YOUR computer (the one being monitored) be able to "SEE" a network shared folder on another computer/server which you are NOT monitoring. You can create this condition to monitor that folder's status.
Why have the Trigger Threshold of 30 minutes (in the screenshot, yours can be different)?
IF the folder is a network shared folder (NAS drive, etc) then just because it could not be found initially, the other computer/server might be in the process of rebooting, or the share purposely taken down temporarily, etc. The Trigger Threshold insures that the WinScry Windows Service will try to locate the folder multiple times and will only trigger an Alert if an adequate amount of time has passed to determine that there might be a real problem.
|
---|
|
Scenario 2. Trigger based on the number of files in the folder.
Check the #2. Activate this alert condition based on the number of files in the folder box for the Folder Alert Condition to Trigger based on how many files of a certain type exist in the folder. You simply select an operator in the list (Greater Than or Less Than) and enter the relevant threshold number. Optionally, you can also enter 1 or more file extensions which should be counted. Just enter the extension(s) separated by a comma. If you leave this field blank then WinScry will count ALL files (*.*).
What is the benefit of using this condition?
Consider this real world situation. You have a process which receives orders for widgets in the form of ASCII text files which will be placed in a folder. Files are then processed by a background service which imports the order information into a database. IF one of the order files contains an ERROR which prevents the background process from importing it, that file is moved to an ERRORS folder. IF the process is working correctly the ERRORS folder should ALWAYS be EMPTY. So you create an alert condition to monitor the ERRORS folder and trigger if the number of files detected is ever GREATER THAN 0 (zero).
In the example screenshot to the left the condition is configured to count files of type (LOG and TXT) and Activate if that number ever exceeds 200. The condition will then Trigger if that condition persists for more than 30 minutes. |
---|
|
Scenario 3. Trigger based on the AGE of files in the folder.
By checking box #3 you can configure your Folder Alert Condition to Trigger based on the age of either the Newest or the Oldest file in the folder. File age is determined by comparing the Last Modified timestamp of the file to the current system date/time.
Step 1: You select whether WinScry to look at the Oldest or Newest file in the folder. Step 2: You select an operator in the list (Greater Than or Less Than) and enter the relevant age threshold value. Step 3: Check the #3. Activate this alert condition based on the age of that file box.
Optionally, you can also enter 1 or more file extensions which should be counted. Just enter the extension(s) separated by a comma. If you leave this field blank then WinScry will choose the Oldest/Newest file from ALL files (*.*).
In the example screenshot to the left the condition is configured to look at the NEWEST file of type (LOG, TXT) in the folder and Activate if that file is GREATER THAN 60 minutes old. The condition will then Trigger if that condition persists for more than 30 minutes. |
---|
Using a Folder Alert Condition to monitor network drives, mapped drives or virtual drives
IMPORTANT. All of the real "work" in WinScry is done by the WinScry Client MS Windows Service (See Running the Monitor Service). What is important to know (and is often forgotten) about Microsoft Windows Services is that by default and by design they DO NOT have access to any network resources. Microsoft Windows Services run in their own memory space separate from normal Windows Users who have to log in to Windows to perform tasks, this is why Windows Service applications can start when the computer powers up and don't need to wait for someone to actually log in to the computer/server.
This means that for Folder Alert Conditions that want to monitor a network shared folder or NAS device it is very likely that the WinScry Service will not be able to "see" those folders unless you take special action. If you experience this problem you will very likely need to configure your WinScry Service to run under the context of a Windows User who DOES have access to those shared folders etc. Using Mapped Drive letters is also usually particularly problematic and thus we STRONGLY advise against trying to use mapped drives. Instead, when selecting your folder browse to it directly through the NETWORK rather than using a mapped drive letter.
The steps below are usually sufficient to resolve these issues.
|
Step 1. Open the MS Windows Services Snap-In
Before you begin, you should make sure that the WinScry Windows Service has been installed and is not running.
In the Tools menu on the main window you can find an option to Open the MS Windows Services. Clicking that will open the MS Windows Services Snap-In.
In the Services list scroll down and select the WinScry System Alerts (Client) (see Screenshot).
RIGHT CLICK on the WinScry service and select Properties from the right-click menu. This will bring up the Service properties and you can proceed to Step 2.
|
---|
|
Step 2. Configure the WinScry Service to Run as a User
In the Service Properties Window click the Log On tab.
In the Log On tab check the This Account box.
From here you can just type in the domain user, the password, confirm the password and click the OK button, but you will probably find it MUCH easier to click the Browse button to open the Select User Window.
In the Select User window you can enter the domain user you want the service to run as and then click the Check Names button. If you've entered the username correctly then Windows will replace what you typed with the fully qualified domain notation for the user.
|
---|
|
Step 3. Make sure that it worked!
After you have selected the domain user the service should run as click Ok to return to the MS Windows Services Snap-In. All that remains is to make sure that it worked.
Select the WinScry System Alerts (Client) (see Screenshot). In the Log On As column of the services list you should now see the domain user you selected rather than the default value (Local User).
RIGHT CLICK on the WinScry service and select Start Service from the Right-Click menu. If you made an error setting the "Run-As" user then the Service will not start and will display an error message to that effect.
If the service starts successfully, then all that you have to do is wait for your alert emails to see if this solved the problem. You can speed this process up by resetting the monitor.
|
---|