File Size Check

When files and folders grow unbounded in size, this can often be an early indicator of a problem on a system, for example a Microsoft SQL Server log file can easily grow to fill the entire disk. Similarly, if a file or folder is below an expected size then this can also indicate a problem, for example if an application has not written to its log file because it failed to run.

The File Size Check allows you to monitor the size of a group of files, folders (and sub-folders) generating an alert when the size of the group is greater or less than the specified threshold.

Multiple files, folders and sub-folders can be monitored per check, and multiple checks may be created on the same device for both 24x7 (critical files and folders) and Daily Safety Checks (non-essential files and folders).

The File Size Check requires the full UNC Path to query both local and networked locations. The wildcard * can be used in the path where required. See File Inclusion Filter and File Exclusion Filter for usage of the wildcard.

Dashboard Check configuration


  1. Select the device in the North-pane of the Dashboard
  2. Go to the Checks tab
  3. Click Add Check
  4. Choose Add 247 > File Size Check
  5. Configure settings

  6. To run an Automated Task when the Check fails choose Assign a Task after creating the Check
  7. OK to save and apply
  8. Where Assign a Task after creating the Check is selected:
    1. Select the script
    2. Click Next to configure
  9. Enter the Command Line parameters (if required)
  10. Set a Script timeout in the range 1 - 3600 seconds (default 120 seconds)
  11. Click Finish to save and apply


  1. Select the device in the North-pane of the Dashboard
  2. Go to the Checks tab
  3. Select the target File Size Check
  4. From the Check drop-down
  5. Click Edit Check (also available from the Check's right-click menu)
  6. Configure the settings
  7. Click OK to save and apply


  1. Select the device in the North-pane of the Dashboard
  2. Go to the Checks tab
  3. Select the target File Size Check
  4. From the Check drop-down
  5. Click Delete Check (also available from the Check's right-click menu)
  6. Enter the password you have logged into the Dashboard under to confirm removal
  7. Click OK to delete



The first stage is to give the check a meaningful name for identification on the Dashboard and in alerts.

Alert When

This threshold determines when an alert is generated. The options here are for less than [<] or greater than [>] the specified value. The specified value can be expressed as Bytes, Kilobytes (KBytes), Megabytes (MBytes) or Gigabytes (GBytes).

File Inclusion Filter

To select the files and folders for inclusion simply use the browse button to navigate to the required file or folder. If you wish to monitor the subfolders please enable the Include Subfolders option.

Please note that you can enter a wildcard for either inclusion or exclusion, but a File Inclusion Filter must be tied to a specific location. For example, a File Inclusion Filter of C:\WINDOWS\system32\*.txt will include all text files in the folder C:\WINDOWS\system32, whereas just entering *.txt, will return an empty result as a search location is not specified.

File Exclusion Filter

There may be instances where you wish to exclude specific files and subfolders in a monitored folder and the File Exclusion Filters can be applied to exclude both explicit files and subfolders by navigating to them via the browse button.

As mentioned above a wildcard may be entered, but unlike the File Inclusion Filter this does not have to be tied to a location. For example using *.txt will exclude all text files discovered in the monitored folders.

Microsoft SQL Server Example

The above image illustrates setting up a File Size Check to monitor the combined size of all Microsoft SQL Server instances by adding File Inclusion filters for all data (*.MDF) and log (*.LDF) files in the Microsoft SQL Server data directory. File Exclusion Filters for temporary databases' data and log files are also added.

Notes - Floating Point Numbers

To avoid integer conversion cut-offs, we would suggest entering a value without any floating point numbers.

For example if entering 1.2 Gbytes due to integer conversion cut-offs this would be interpreted in the check as 1 Gbyte exactly, rather than 1.2 Gbytes. As such to monitor 1.2 Gbytes (1228.8 Mbytes) we would suggest configuring the check to use either 1228 Mbytes or 1229 Mbytes.

File Size Check - Permissions Problems

The File Size Check queries local and networked locations (using the full UNC Path) and may fail where the Agent is unable to determine the size of a file. If the file exists, it is inaccessible, for example, the Agent does not have sufficient privileges or permissions to query the file or its parent folder.

For troubleshooting, the Agent reports both the Check failure and the name and location of the problem file.

To alleviate the issue, you can either add the problem file or folder to the File Exclusion Filter or change the permissions of the Agent, file or location to ensure it is reachable by the Agent.

Running Test Check in the Agent console can provide an indication of permissions problems. For example, the Check passes (running under the permissions of the user initiating the Test) but fails when it runs as scheduled (using the permissions the Agent service is running under).

Where the account the Agent service is running under does not have sufficient permissions or privileges to query the selected location it may be necessary to change the Advanced Monitoring Agent Log On account to allow access.