What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

monitor all folder on C: drive

Votes:

0

Your Vote:

Up

Down

Hello , is it possible to monitor all folder on a windows server (eg C:\) and show like folder sensor will display folder size and display the folder is growth and how much it growth?

disk folder prtg

Created on Jul 18, 2016 1:55:12 AM by  a23554 (0) 2



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Dear a23554

WQL means WMI Query Language and its syntax is similar to SQL. Depending on the programming language you use for your custom sensor, you can use WQL. Powershell on the other hand uses a different approach, you can return WMI objects and use the Powershell syntax (instead of WQL syntax.)

You might want to use a non-WMI script (though it only works locally) as a starting point.

param([string]$path = "C:\temp" ,[string]$mask = "*.*",[switch]$recursive = $false,[switch]$dironly = $false)
$Options = @{
    Recurse = $recursive
    Directory = $dironly
    Path = $path
    Filter = $mask
}
$Items = (Get-ChildItem @Options).Count
Write-Host ([string]::Format("{0}:{0} Objects found in {1}", $items,$path));

Though this sensor counts items, not size, it could be starting point to have something to play with / expand on.

Created on Jul 20, 2016 10:22:36 AM by  Arne Seifert [Paessler Support]



3 Replies

Votes:

0

Your Vote:

Up

Down

Dear a23554

A treesize-like monitoring is not implemented in PRTG, I am sorry. PRTG can only measure the size of pre-defined folders.

Created on Jul 19, 2016 1:21:03 PM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Dear Arne

Thanks for your answer, now I have another question. I want to ask about the folder sensor. What method dose the folder sensor collect the folder size? Is WQL? If is WQL can you tell me what its WQL is. Because I want to write custom sensor but I don't know how to collect data. Thank you

Created on Jul 20, 2016 5:32:19 AM by  a23554 (0) 2



Accepted Answer

Votes:

0

Your Vote:

Up

Down

Dear a23554

WQL means WMI Query Language and its syntax is similar to SQL. Depending on the programming language you use for your custom sensor, you can use WQL. Powershell on the other hand uses a different approach, you can return WMI objects and use the Powershell syntax (instead of WQL syntax.)

You might want to use a non-WMI script (though it only works locally) as a starting point.

param([string]$path = "C:\temp" ,[string]$mask = "*.*",[switch]$recursive = $false,[switch]$dironly = $false)
$Options = @{
    Recurse = $recursive
    Directory = $dironly
    Path = $path
    Filter = $mask
}
$Items = (Get-ChildItem @Options).Count
Write-Host ([string]::Format("{0}:{0} Objects found in {1}", $items,$path));

Though this sensor counts items, not size, it could be starting point to have something to play with / expand on.

Created on Jul 20, 2016 10:22:36 AM by  Arne Seifert [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.