What is the best way to monitor a folder for number of files? We would like an alert when a folder size reaches a certain threshold.
Thanks!
There is File Count template you can setup and then you may setup an alert based on that component monitor type by value.
To assign a template through the Manage Application Monitor Templates
page:
1. Log on to your Orion NPM Web Console with an Administrator account.
2. Click Application Performance Monitor in the Modules toolbar.
3. Click APM Settings.
4. Click Manage Application Monitor Templates.
5. Check the checkbox next to the template you want to assign.
6. Click Assign to Node.
7. Select the server node or nodes to which you want to apply the application
monitor template, and then click Next.
8. If suitable credentials already exist, choose the credential from the
Choose Credential list.
9. If suitable credentials do not exist, choose <New Credential> from the
Choose Credential list, and then add the new credential by filling out the
credential details.
10. Click Test to test the credentials and component monitors against the test
node..
11. If the test fails, troubleshoot the problem based on the error messages, and
then retest the node.
12. If the test passes, click Assign Application Monitors.
To setup an alert see:
Configuring Orion APM Alerts
on page 55- for steps.
http://www.solarwinds.com/support/apm/docs/APMAdministratorGuide.pdf
The File Count Monitor = 39 for the component monitor type.
Hope this helps.
I have the file count template associated with my node(server). I have the template open to modify the unc path but I am not sure exactly which line to edit. Can you point me to the exact line/entry?
I guess it's in here somewhere??
Else
WScript.Echo "Message: Usage: cscript.exe FileCount.vbs [pathToFiles] [extension]" _
&vbCRLF &" [pathToFiles] Local or UNC Path "_
&vbCRLF &" [extension] File Extension (no ""."" required )"
WScript.Echo "Statistic: 0"
WScript.Quit( FAIL )
End If
????
Hello,
you don't modify script itself at all. You should pass UNC path as an argument to script using appropriate filed in component settings in APM.
I'm sorry but I don't understand what you are asking.
To use file count script create new Windows Script Monitor component in APM, paste script into filed for script body and to field for script arguments enter UNC path and optionally file extension if you want to count only files of one type.
Your initial post was fine. From that I figured I needed to add "File Count Monitor" as opposed to just "File Count". I have the path added now but it's been runing for a long time on an empty folder so I was responding to another post. In the other post he said it ran for a long time then he said it was fixed but didn't specify what he might have changed to fix it. So currently my monitor has been testing for over 20 minutes now on a fodler that is empty and has no subfolders.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.