I am a bit new here on Stackoverflow (which you can probably see by my reputation), but I was wondering how to make an audible alert or some other type of modification to an auto polling log file of failed login attempts for RDP (specifically XRDP) sessions on a Rasbperry Pi.
Since it is a Raspberry Pi, I am sure you understand why I would want to run it headless.
I have done lots of searching and only seem to find references or ways to make audible alerts when connected directly to the Pi. I want to have this alert come while running in a mostly silent terminal window. I would prefer a beep for new log activity (if log file size has changed, beep) and then the log to be checked at specific intervals (i.e. every 30 seconds or 1 minute, etc).
My log location is here if it helps in giving me some idea how to start making this Bash script /var/log/xrdp.log
Here is a gist of a bash script that will do exactly what you want, over SSH, on a Raspberry Pi (or any Linux, really):
https://gist.github.com/free5ty1e/300adb0800ba45f3fe4e
Once you have created the xrdpLogMonitor.sh file, don't forget to set it as executable by typing:
Then execute it by typing: