I'm trying to get a handle on an EMC NAS UNC point. I'm using SAM 6.2.
The problem I'm trying to solve: This is a file repository which is used to store images as well as pull images from for a web service. When too many files are put in, the web service times out trying to search for the file it's looking for...resulting in a failure of the web page. A few times now, the owner would simply log in, clear out files, and the service would go back to working. I'd like to make that automatic, or at least send the user a notification that he'll have to do that soon. We don't need to build the Taj Mahal of alerts, as this server is slated to be retired by the end of the year. I just need to get a decent check on it to get it monitored.
What I'd like to do is map the drive on the web server, then from SAM run a remote script which would do a simple "DIR" command, then grab the end of it, and report how many files were in the directory and how many bytes were consumed. These values would be returned back as Statistic metrics, to be tracked and used for alerting.
I don't want to re-invent the wheel, though. So if this already exists, can someone point me to the correct template?
If it doesn't exist already as a template, would anyone like to offer suggestions for a PowerShell script I could run from within SAM?
Thanks in advance.