How to use APM monitor a folder size , not file size?
For this case I would suggest using Windows Script Monitor with following script:
Dim folderPathfolderPath = WScript.Arguments(0)Set fs = WScript.CreateObject ("Scripting.FileSystemObject")Set folder = fs.GetFolder(folderPath)WScript.Echo "Message: Folder " & folderPath & " is " & folder.Size & " bytes large"WScript.Echo "Statistic: " & folder.Size
Directory Size Monitor uses WMI and in this case it's really slow. Using VBscript gives you results as fast as if you open folder properties in Windows.
Hello Jerry,there is no out-of-the-box monitor for this in APM but you can easily use Windows Script Monitor for this. You can either look at content exchange here, for example on this File and Folder Size Template, or you can write your own script for that. It would be just simple VBscript that may look like this one.
EDIT: I was wrong, I completely forgot that there is Directory Size Monitor in APM. Please see below.
Hi Jerry,
Is there some reason why you can't use the Directory Size Monitor in Orion APM?
Best regards,
Mike
Directory Size Monitor
This component monitor determines the disk space used by the files in a directory, optionally including all subdirectories. Files that do not match the File Extensions Filter are not included in the disk space calculation.
Statistic
The disk space used in bytes.
Field Descriptions
Enable Component
Determines whether the component is enabled. Disabling the component leaves it in the application in a deactivated state not influencing either APM application availability or status.
Credential for Monitoring
Select a credential that has read access to the file. If the credential you need is not already present in the credentials list, use the Quick Credentials section to add a new credential.
Full directory Path
The path to the monitored directory. Specify the path in Universal Naming Convention (UNC) format. For example: \\computername\c$\logfiles\. The path can include the variable${IP} which represents the target node's IP address.
File Extensions Filter
Determines which file extensions are included in the disk space usage calculations for the directory size. It is a simple text matching filter, and * is a wildcard.
Include Subdirectories
Determines whether the contents of subdirectories are included in the disk space usage calculations for the directory size.
Response Time Threshold
These fields allow you to set warning and critical threshold conditions based on the response time. The response time is the time in milliseconds it takes Orion APM to determine that a component is not Down and to retrieve any statistical data.
Statistic Threshold
If the value of the statistic meets the limits set in these fields, Orion APM places the component monitor into the respective warning or critical state.
The documentation for Directory Size Monitor is shown below:
Determines whether the component is enabled. Disabling the component leaves it in the application in a deactivated state not influencing either Orion APM application availability or status.
The path to the monitored directory. Specify the path in Universal Naming Convention (UNC) format. For example: \\computername\c$\logfiles\. The path can include the variable ${IP}which represents the target node's IP address.
Regards,
thank you
I ues the Directory Size Monitor ,but APM tell me
what can I do for this message?
Jerry, could you please send a screenshot with your Directory Size Monitor settings?
Are you monitoring directory on Orion server or on other node? What is the path to that directory?
I need monitor three folders , there path are "D:\public" "D:\share" and "D:\tools".
Now I can monitor public and share, the folder tools cann't monit ,when I test it ,it will display testing and without any prompt.
This picture is tools folder's property.