Hello, I am trying to figure out a way to monitor a folder that a batch process drops text files into. In the name of the text file is a number after the first three letters and I then want a way to query a sql table to check if it got entered. Is that possible, so for each new file, wait a few seconds, then query SQL and if it doesn't match, then create alert?
Thanks!
Article Comments
Hello,
This isn't something one of our sensors would be able to do natively. The best method to accomplish this would be to create a custom sensor to accomplish this. PRTG could invoke it with a Folder sensor, because we can watch a folder, and alert based on the age of the newest file. So PRTG could trigger an alert that kicks off this script. The script would handle all the logic you're asking for, and the pass a result code back to PRTG.
If this sounds like something you're interested in looking into, I would check out the PRTG API Custom Sensors section. Go to Setup -> PRTG API -> Custom Sensors in your web UI for more information.
Thanks!
Benjamin Day
Paessler Support
Oct, 2019 - Permalink
Hello,
This isn't something one of our sensors would be able to do natively. The best method to accomplish this would be to create a custom sensor to accomplish this. PRTG could invoke it with a Folder sensor, because we can watch a folder, and alert based on the age of the newest file. So PRTG could trigger an alert that kicks off this script. The script would handle all the logic you're asking for, and the pass a result code back to PRTG.
If this sounds like something you're interested in looking into, I would check out the PRTG API Custom Sensors section. Go to Setup -> PRTG API -> Custom Sensors in your web UI for more information.
Thanks!
Benjamin Day
Paessler Support
Oct, 2019 - Permalink