Hello Chris,
To add on to Ivan's reply, if you're using syslog you can do this with
rsyslog itself (standard syslog daemon on most distributions these
days). It would look something like this:
Add a file in /etc/rsyslog.d/guac-login.conf with:
# If we give out DHCP for a specific network send an alert email
$ModLoad ommail
$ActionMailSMTPServer mail.domain.com
$ActionMailFrom [email protected]
$ActionMailTo [email protected]
$template mailSubject,"Successful guacamole login on %hostname%"
$template mailBody,"User has logged in:\r\n\r\n%msg%"
$ActionMailSubject mailSubject
# Only send an email every 5 minutes
$ActionExecOnlyOnceEveryInterval 300
# This if/then must all be on one line
if $msg contains 'successfully authenticated' then :ommail:;mailBody
----
Other options are anything that monitors logs, like swatch, expect
scripts, splunk, nagios and probably a million others can all do
real-time alerting if you need.
--Caleb
On 4/21/20 9:05 PM, ivanmarcus wrote:
Chris,
I'm not aware of any current extension, or facility within Guacamole
to do this - although someone may come up and point something out!
If it were me I'd use a variation of the WOL Python script I wrote for
Guacamole a while ago (as long as you didn't need to do this for too
many users - it'd get a bit tiresome to administer otherwise).
The way this works presently is to continuously poll catalina.out for
a successful connection number and compare that to a list. If a match
occurs it generates the necessary magic packet.
Using this as a base it wouldn't be difficult to alter the script to
use a standard Linux mail util to deliver mail in place of the magic
packet.
The WOL script should be on the list but I'm happy to post it again if
need be.
On 22/04/2020 2:35 p.m., Chris Lee wrote:
Hi All,
�
Is it possible to send email notification when some users success
logon the system?
�
Regards,
Chris
�
This message and its attachment (if any) are strictly confidential
and sent to the designated recipient(s) only. If you are not the
intended recipient, please notify the sender by e-mail and delete
this message and its attachment (if any) from your computer system
immediately . Century City International Holdings Limited, Paliburg
Holdings Limited, Regal Hotels International Holdings Limited, its
respective related subsidiaries, associated companies and affiliates
do not guarantee this message and its attachment (if any) are free of
computer virus and would not accept any liability whatsoever arising
from Internet transmission.