Hi everyone
I'm using router to give some of my users Remote Desktop access to their office computers and was wondering if it could be possible to get, let's say daily/weekly, notifications of all the RD sessions. Searching the Forum I've stumbled upon above post (thanks
dssmiktik), which works but not quite as I would like.
Two issues:
1) as i have a few users/computers, log prefix is not a single one, but "RD -> Laptop 1" or "RD -> Desktop 5". Above script searches for exact prefix.
2) script sends one email for each occurrence, like this line
21:20:19 firewall;info [RD -> Desktop D-002] dstnat: in:VLAN1 out:(none), src-mac 80:fb:06:35:31:30, proto TCP (SYN), 5.180.58.94:59921->117.65.198.209:4223, len 52
So, when the script is run, for the 50 buffered events I get 50 emails with a single line in them. It would be good if it could compose a single email, but with all events logged in the buffer between two script run times
"Small" problem is, I REALLY don't know anything about scripting. Is there someone here who could advise how to rework dssmiktik's script to:
- find prefixes which begin with certain string (instead of finding the exact one) and, more importantly.
- compose single email with multiple buffered occurrences from the last time script was ran
Or, different approach, maybe
Cheers