E-Mail Notification to detect if specific user is currently logged on to a computer
Is there an E-Mail Alert Notification Query to tell if a specific user is currently logged on a specific computer (MACs or Windows). Basically I want to get an E-Mail Notification if a certain user is detected as being logged in when the Alert runs, but no Email if it is not that user or they are not connected. This user should not be logging onto these specific computers and we'd like to catch them in the process. The code below is pulling the user and the machines I want, but I want to filter out disconnected machines and only get connected.
select MACHINE.*, C.CLIENT_CONNECTED, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_SECONDS
LEFT JOIN KBSYS.KUID_ORGANIZATION O ON O.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION C ON C.KUID = MACHINE.KUID AND O.ORGANIZATION_ID = 1
where ((( USER_LOGGED like '%ouruser%') AND MACHINE.NAME like '%ourmachine%'))
Is this possible or will this not work?