Get directory and child element details including folder count, file count, and the folder's total size. It also records the newest and oldest file (with age) in that folder. The folder you want to watch is the first (and only) script parameter which defaults to C:\Windows\Temp.
The component returns the following metrics
- Age of Parent Path - the age of the parent folder, stored as "seconds ago" (i.e. 93 indicates that the folder was created/updated 93 seconds ago)
- Child Folder Count - the number of child folders (collected recursively).
- Child File Count - the number of child files (collected recursively).
- Child File and Folder Size (bytes) - the total number of bytes used for storage of the contents. This is stored as bytes to match the rest of the Orion infrastructure.
- Newest File Age (seconds ago) - the age (and path in the message) of the newest file, regardless of location in the folder, stored as "seconds ago" (i.e. 93 indicates that the folder was created/updated 93 seconds ago)
- Oldest File Age (seconds ago) - the age (and path in the message) of the oldest file, regardless of location in the folder, stored as "seconds ago" (i.e. 93 indicates that the folder was created/updated 93 seconds ago)
- Folder Path Exists - does the parent folder exist. 1 = True / 0 = False
The template has been tested with Windows Server 2012-2019 using both the SolarWinds Orion Agent and using traditional WMI collection. This script relies that you organization/security team are not blocking "admin" shares on the remote machines [\\COMPUTERNAME\D$\Folder\File.txt].
Example screenshot assigned to node "EASTHYV01A" with script parameter "H:\Hyper-V":
