Skip to main content
Storage & files

Directory File Count

Detect stuck queues or missing job outputs from the number of matching files in a folder.

The Directory File Count check counts the files in a folder that match a pattern and compares the count with two thresholds. This lets you spot a stuck print or mail queue (too many files) or missing job outputs (too few files). The check runs through the octoja agent directly on the device, on Windows, Linux, and macOS (x64 and Arm64 each), every 15 minutes by default.

Steps

  1. Go to Devices and open the device.
  2. Click the Checks tab → Add Check → Directory File Count.
  3. Enter the Directory path and adjust the pattern and thresholds if needed.
  4. Click Add Check.

Alternatively, assign the check with a config package.

Settings

FieldTypeRequiredDefaultDescription
Directory pathStringYes—Absolute path of the directory to count files in
File patternStringNo*Glob to match, e.g. *.pdf. An empty field counts all files.
Include subdirectoriesBooleanNoNoAlso counts matching files in all subfolders
Alert when count is lowBooleanNoNoAlert when the count is at or below the thresholds instead of at or above (e.g. expected outputs missing)
Warning file countIntegerNo1000Count at which a warning is raised
Error file countIntegerNo5000Count at which a critical result is raised
  • The Error threshold corresponds to the Critical level.
  • In default mode, Error file count must be above Warning file count; with Alert when count is low, below it. If the values are entered the other way round, the check silently swaps them before evaluating.
  • Mind the defaults of 1000 and 5000 when using Alert when count is low: after the swap, any count up to 1000 is reported as critical and up to 5000 as a warning. Set low thresholds instead — with Error file count at 0, for example, an empty folder becomes critical.
  • Only files are counted, not folders.

Results

SituationResult
Default: count reaches or exceeds Warning file count / Error file countWarning / Critical
Alert when count is low on: count reaches or falls below Warning file count / Error file countWarning / Critical
Count is on the safe side of both thresholdsOK
Directory path is emptyWarning, No directory configured
Directory does not existWarning, Directory not found
Access or read error while countingWarning, Access denied
Other unexpected error while countingFailure

The check details show the directory path and the number of files counted.

If Include subdirectories is on and a single subfolder cannot be read, counting stops and the check reports Access denied as a warning.