9 years ago
Monitor the size of a folder
I had a discussion with one of the support Engineers and like to raise this as a feature request. I would like to monitor a folder size on a windows and set up an alert if the utilization reaches "...
@mnagel Thanks , I got a working datasource to check the folder size now. @SchuylerCthere's a beta datasource for this in the repository now (search for folder size). this is the powershell script :
(Get-ChildItem "C:\Users\Administrator\AppData\roaming" -recurse | Measure-Object -property length -sum).sum
Make sure you include "recurse" if you trying to get properties of Administrator folders. The result should be raw output (folder size in bytes) and then I created a complex datapoint to convert bytes into GB (Size/1024/1024/1024)