How are we supposed to configure the Folder monitor to check the ages of files in a domain-based DFS namespace?
Let's say (for example) I have a path of:
\\corp.local\company\public\temp
and want to check that no files in there are older than 30 days. The sensor help specifies that:
If the folder is located on a network device, use the UNC path without the computer name
(for example, only ''path\to\folder'' instead of ''\\computerName\path\to\folder'').
The computer name will be inherited from the parent device of this sensor.
I've created a device with a IPv4/DNS entry of corp.local and in the Folder sensor under this device specified the folder as company\public\temp however the sensor returns an error code of "Cannot access folder: The folder doesn't exist (code: PE032)".
Am I doing something wrong, or are domain-based namespaces not supported by this type of sensor?
Article Comments
Hi Andreas,
I thought that might be the case. In case anyone else is after this functionality, I've written a very basic EXE/XML custom PowerShell script which will do the job, which takes two parameters. $searchPath is the full domain-based DFS path, $daysToScan is the maximum age of files, any of which are older than this value will be added to the returned count value.
Using the example path in the question and counting all files older than 30 days, the parms passed to PRTG's "Parameters" field in the sensor config would be:
\\corp.local\company\public\temp 30
Full script code available at: https://pastebin.com/c3s7r7aj
Thanks!
Mar, 2018 - Permalink
Hi Dominic,
Thank you very much for sharing!
Kind regards,
Andreas Günther, Technical Support
Mar, 2018 - Permalink
Hi Dominic,
Thank you very much for your KB-Post. I'm very much afraid we do not have native sensors for this in PRTG.
One option would be to write a custom script for this, and then running it as a Custom Sensor.
Thank you for your understanding!
Kind regards,
Andreas Günther, Technical Support
Mar, 2018 - Permalink