File Size Check

The File Size Check monitors the size of a group of files, folders (and sub-folders) and generates an alert when the size of the group is greater or less than the configured threshold.

You can configure the File Size Check to monitor multiple files, folders and sub-folders, and you can create multiple checks on the same device for 24x7 (critical files and folders) and Daily Safety Checks (non-essential files and folders).

The File Size Check is helpful when files and folders grow unbounded in size, which is often an early indicator of a problem. 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 it 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 requires the full UNC Path to query both local and networked locations. The wildcard * can be used in the path where required. For more information, see Configuration settings.

Check configuration

Add

  1. On the N-sight RMM Dashboard North-pane, select the device.
  2. Go to the Checks tab.
  3. Click Add Check.
  4. Choose Add DSC > File Size Check.
  5. Configure the settings.
  6. To run an Automated Task when the Check fails choose Assign a Task after creating the Check.
  7. Select OK to save and apply.
  8. If you selected Assign a Task after creating the Check:
    1. Select the Automated Task script and select Next to configure. The following example is for Windows Automated Tasks. Other task options display for Linux and macOS devices.

    2. Enter any required Command Line parameters or Script parameters and select Next.
    3. Set maximum permitted execution time for the script (optional).
    4. Select Finish to save and apply.

Edit

  1. On the N-sight RMM Dashboard North-pane, select the device.
  2. Go to the Checks tab.
  3. Right-click the target File Size Check and select Edit Check.
  4. Configure the settings.
  5. Click OK to save and apply.

Delete

  1. On the N-sight RMM Dashboard North-pane, select the device.
  2. Go to the Checks tab.
  3. Right-click the target File Size Check and select Delete Check.
  4. Enter the password you have logged into the Dashboard under to confirm removal.
  5. Click OK to delete.

Configuration settings

Setting Description
Name Enter a meaningful check name for identification on the N-sight RMM Dashboard and in alerts.
Alert when Configure the treshold for when an alert is generated. The options are for less than [<] or greater than [>] the specified value. The specified value can be Bytes, Kilobytes (KBytes), Megabytes (MBytes) or Gigabytes (GBytes).
File inclusion filters Enter the files and folders to include for monitoring. To monitor subfolders, select the Include Subfolders checkbox.

You can enter a wildcard for inclusion, but a file inclusion filter must be tied to a specific location. For example, a file inclusion filter of C:\WINDOWS\system32\*.txt includes all text files in the folder C:\WINDOWS\system32, but a filter of *.txt, returns an empty result because no search location is specified.

File exclusion filters Enter the files and folders to exclude from monitoring.

You can enter a wildcard for exclusion, and it doesn't need to be tied to a location like the file inclusion filter. For example, *.txt excludes all text files discovered in the monitored folders.

Example

The following example shows configuring 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.

Floating Point Numbers

To avoid integer conversion cut-offs, we recommend you enter values without any floating point numbers.

For example, if you enter 1.2 Gbytes, due to integer conversion cut-offs this is be interpreted in the check as 1 Gbyte exactly, rather than 1.2 Gbytes. To monitor 1.2 Gbytes (1228.8 Mbytes), we recommend you configure 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 if 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.