This thread is very similiar to the one found at Need help getting File Count monitor to work, but different enough (and enough time has lapsed) for me to feel that a new topic was necessary.
I am wanting to use the File Count Monitor to tell me how many *.tmp files are in a particular directory on each of a set of our servers. However, I began to notice yesterday that once the count got somewhere above 28k or so the process would just bomb out entirely. Instead, it would generate an error of "Unexpected error occurred. Quota violation".
This makes me think that there is some sort of upper limit (time to complete, file count number, etc) that File Count Monitor can handle before it bombs out. However, I am at a loss for coming up with a replacement. I had tried a PowerShell Script Monitor with the following code:
Param([string]$Path)$FileType = "*.tmp"$FileCount = [System.IO.Directory]::GetFiles("$Path", "$FileType").Count'Message.FileCount: Number of *.tmp files found.''Statistic.FileCount: ' + $FileCount
When this code is tested outside of Orion, I get the expected results and file count, and it completes within a few seconds. However, when I test it in Orion, I get an output of:
Message.FileCount: Number of *.tmp files found.
Statistic.FileCount: NaN
How can I accurately monitor this directory in Orion, or what am I doing wrong? Such a simple task is giving me nothing but headache.