What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How to monitor folder for newest files?

Votes:

0

Hello,

I need to monitor folder for newest MP3 files, there are some other files in a folder which shall not be taken into consideration. I need alert if newest MP3 is older then 24 hours. I assume I can not use Folder Sensor since it does not allow for wildcards. Is it possible to do with PRTG?

file-age file-monitoring folder-sensor

Created on Oct 6, 2014 4:49:31 PM



5 Replies

Accepted Answer

Votes:

0

Hi,

This would be possible with Custom Sensor PTF.NetworkFileCount

This Custom Sensor returns the number of files available on a server\share. As your PRTG server runs under the local system account it can't access files on a
server\share. This sensor uses the given username and password of a valid user account that can access the files and returns the number of files.

Parameters:

 -f=	 The name of the folder that needs to be checked in a \\server\share format. 
 	 If the foldername contains white spaces, enter the foldername between " ". 
 -u=	 Optional the name of the user account that can access the share. 
 -p=	 Optional the password or passhash(*) of the user account that can access the share. 
 -t=	 Optional the minimum number of minutes a file has to be old before it is counted. 
 -s=	 Optional the search pattern to be used (i.e. *.txt). 
 -sub	 Optional switch to include subfolders. 
 -tiw	 Optional, in combination with the -t= parameter, creates a time window between the current time and xx minutes ago. 
 	 Only files created in that period are counted. 

The sensor can be downloaded from http://prtgtoolsfamily.com/?page=downloads_sensors

Created on Oct 7, 2014 10:05:28 AM



Votes:

0

Thanks. It does not appear to be working properly or I misunderstand -t parameter. I run EXE with following parameters to calculate number of files which was created at most 1 day ago and it's showing that no files are there, even though there is bunch of files which were created less then 24 hours ago.

C:\Program Files\PRTG Network Monitor\Custom Sensors\EXE>NetworkFileCount.exe -f


zyxel\surveilance\video\BigRoom -s=*.mp4 -t=1440

8.0.2.1 0:No files found

C:\Program Files\PRTG Network Monitor\Custom Sensors\EXE>dir
zyxel\surveilance \video\BigRoom\*.mp4 Volume in drive
zyxel\surveilance is surveilance Volume Serial Number is A456-0B9F

Directory of
zyxel\surveilance\video\BigRoom

10/07/2014 08:27 AM 150,159 2_2014-10-07_08-26-12.mp4 10/07/2014 08:43 AM 142,567 2_2014-10-07_08-42-42.mp4 10/07/2014 08:25 AM 293,870 2_2014-10-07_08-24-47.mp4 10/07/2014 08:26 AM 367,750 2_2014-10-07_08-25-37.mp4 10/07/2014 08:26 AM 184,455 2_2014-10-07_08-25-21.mp4 10/07/2014 08:27 AM 204,358 2_2014-10-07_08-26-00.mp4 10/07/2014 08:33 AM 347,789 2_2014-10-07_08-32-32.mp4 10/07/2014 08:33 AM 501,147 2_2014-10-07_08-32-11.mp4 8 File(s) 2,192,095 bytes 0 Dir(s) 827,755,368,448 bytes free

Created on Oct 7, 2014 1:53:38 PM



Votes:

0

Using -t=1440 should count files that are at least 1440 minutes old.

Using -t=1440 in combination with the -tiw switch should count files that are created between now and 1440 minutes ago.

If you run into any further problems, please let me know at [email protected]

Created on Oct 7, 2014 2:03:24 PM



Votes:

0

Is it possible to put sensor in Down state if value of result is say less then 1?

Created on Oct 7, 2014 2:39:52 PM



Votes:

0

Yes, you can do this in the sensor channel settings page by enabling limits and setting the lower error limit to 1

See also: https://www.paessler.com/manuals/prtg/sensor_channels_settings

Created on Oct 7, 2014 5:04:44 PM




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.