I want to check if a certain file exists, and then have a alarm. If the file doesn't exist PRTG should show a green status icon of the sensor. Is that somehow possible?
Article Comments
Custom Sensor available
This can also be achieved with Custom Sensor NetworkFileCount
NetworkFileCount -u=username -p=password|passhash -f=\\myserver\myshare [-s=*.exe -sub]
Supply the credentials (username and password) of an account that has read acces to the file location. Set the "-s=" parameter to match the exact name of the file you want to check.
The sensor returns the number of files matching the "-s=" filter, so in this case if the specified file exists it returns 1 and if the file does not exist it returns 0.
The Custom Sensor can be downloaded from this page.
Jul, 2010 - Permalink
This is only possible with a custom sensor, for example the following vbscript:
DEMO - Alarm if file exists.vbs
Please be aware that this script can only be executed by PRTG on a probe. Thus it is necessary to have the file available for PRTG from a probe machine. In this scenario, please also bear in mind the context under which PRTGs Probe service is running, it may not have the same access rights to certain folders/files as a normal (admin) user.
Best Regards.
See Also
Manual section Custom Sensors
Jul, 2010 - Permalink