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

Folder timestamp

Votes:

0

Hi,

here comes the scenario:

Monitor folder from 07:00 to 18:00 => Easy, just setup the schedule. I want to be notified if during this period no new files arrived in the folder. The problem is, that the files are only temporary in this folder. So files come in, get processed and are deleted.

I played with the newest and oldest channels and they work perfectly when there are files permanentely in the folder. But I could not figure out how to handle the situation with the temporary files.

Then I saw that the timestamp of the folder gets modified when new files arrive. So I thought that I could monitor the folder timestamp and get notified when the timestamp is too old. But unfortunately there is no channel for the folder timestamp in the folder sensor.

Any ideas how to handle this problem? I know that there is always the possibility to write a script, but wanted to avoid this if there is already an existing solution.

Kind regards Michael

folder monitor temporary-files timestamp

Created on Jul 22, 2021 8:09:28 AM



1 Reply

Accepted Answer

Votes:

1

Hi,

I was able to find a solution for this using a custom sensor (EXE/Script (Advanced)) and wrote a powershell script that returns the difference between the current timestamp and the LastWriteTime of the folder.

Your guide how to create a custom sensor using powershell was very helpful. https://kb.paessler.com/en/topic/71356-guide-for-powershell-based-custom-sensors

Best regards Michael

Created on Jul 23, 2021 9:45:00 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.