Documentation forServer & Application Monitor
Monitoring your applications and environment is a key capability of SolarWinds Observability Self-Hosted (formerly Hybrid Cloud Observability) and is available in the Essentials edition. Server & Application Monitor (SAM) is also available in a standalone module.

File Count Script

This SAM application monitor template uses a predefined component monitor, File Count Monitor, to check the number of files in a directory. Optionally, you can count files in subdirectories. Files that do not match the file extension or file attribute type are ignored.

This monitor may fail if you attempt to count more than 20,000 files in a directory using the wildcard * filter extension. For an accurate count of files in large directories, consider using a Windows Script Monitor that runs the File Count script. A sample is included in the following default folder on the SolarWinds Platform server: C:\Program Files (x86)\SolarWinds\Orion\APM\SampleScriptMonitors\WindowsScripts.

Prerequisites

None

Credentials

Windows credentials that are valid on both the SAM and target server.

Statistic

The number of files in the directory, as specified by the path in the script argument.

Component monitors

The main component monitor in this template is a File Count Monitor that tallies the number of files in a directory and, optionally, subdirectories. For field descriptions, see File Count Monitors.

To learn about the other component monitors in this template:

  1. Navigate to the Manage Application Monitor Templates page.
  2. Select this template.
  3. Click Edit to display component monitor details.