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

Monitor unique files names in a folder

Votes:

0

I need to monitor a folder to ensure that files are being created on a regular basis (IP video security system). These file names are constructed as follows:

xxxxxx.camerID.psi

xxxxxx = The placeholder for time (changes with each file created)

camerID = the unique identifier for a particular camera (this is constant)

.psi = the extension on the file (this is constant)

I have 4 cameras all putting files in this folder at one time (cannot change that) and I want to monitor to make sure at least one file is created every 24 hours for every camera. Is there any way to get PRTG to monitor this?

Thanks

file-sensor folder-sensor prtg

Created on Oct 14, 2010 2:07:52 PM



Best Answer

Accepted Answer

Votes:

0

PTF.NetworkFileCount

I added an extra switch to the existing PTF.NetworkFileCount custom sensor. With the -tiw switch you can create a time window between now and xx minutes ago, to only count files that are created in that period of time.

-f=folder [-u=username] [-p=password|passhash] [-t=timedelta] [-s] [-sub] [-tiw]

-f=folder          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=username        Optional the name of the user account that can access the share.
-p=password        Optional the password or passhash(*) of the user account that can access the share.
-t=timedelta       Optional the minimum number of minutes a file has to be old before it is counted.	
-s=searchpattern   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.

In your case it would look something like:

-f="c:\camera folder" -s=??????.*.psi -t=1440 -tiw

To count files in "c:\camera folder" that match the search filter "??????.*.psi" and are created in the time window between now and 1440 minutes (24 hours) ago.

The Custom Sensor can be downloaded from this page.

Created on Oct 15, 2010 10:55:58 AM

Last change on Jan 20, 2016 3:10:25 PM by  Erhard Mikulik [Paessler Support]



3 Replies

Votes:

0

Hello,

I'm afraid this is not possible with PRTGs default file/folder-sensors. Maybe with a custom script sensor.

Best Regards.

Created on Oct 14, 2010 3:14:38 PM by  Torsten Lindner [Paessler Support]



Accepted Answer

Votes:

0

PTF.NetworkFileCount

I added an extra switch to the existing PTF.NetworkFileCount custom sensor. With the -tiw switch you can create a time window between now and xx minutes ago, to only count files that are created in that period of time.

-f=folder [-u=username] [-p=password|passhash] [-t=timedelta] [-s] [-sub] [-tiw]

-f=folder          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=username        Optional the name of the user account that can access the share.
-p=password        Optional the password or passhash(*) of the user account that can access the share.
-t=timedelta       Optional the minimum number of minutes a file has to be old before it is counted.	
-s=searchpattern   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.

In your case it would look something like:

-f="c:\camera folder" -s=??????.*.psi -t=1440 -tiw

To count files in "c:\camera folder" that match the search filter "??????.*.psi" and are created in the time window between now and 1440 minutes (24 hours) ago.

The Custom Sensor can be downloaded from this page.

Created on Oct 15, 2010 10:55:58 AM

Last change on Jan 20, 2016 3:10:25 PM by  Erhard Mikulik [Paessler Support]



Votes:

0

Awesome,

I will test this out today. Thanks a million.

Created on Oct 18, 2010 12:53: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.