ls,
I am a new in PRTG. Now I need the following.
I have a folder monitoring where various files are located in and which are then uploaded to an FTP server.
I want to know immediately when a file in that folder is below 2kb. In that folder wil be different files with different names.
Now my question is I have the sensor and settings for use here.
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
Hi,
This can be done with a simple batch sensor folowing the script below:
@echo off set /a counter=0 for /F "tokens=3" %%a in ('dir c:\temp /-c') do ( if %%a LSS 2048 set /a counter=counter+1 ) echo %counter%:Found %counter% file(s) with size less than 2 Kb.The example above will return the number of files in 'c:\temp' having a filesize less than 2 Kb. Using limits, you can set the sensor to a waring or error state.
Nov, 2014 - Permalink