I am trying to set a screen in UDT that only shows physical devices and their users that are Connected.
Actually, I am attempting to show only ONE user and where that user is currently connected.
The rational is twofold.1. If I have a rogue user going through the company or a specific site, I want to find that device/user quickly to track the movements. (The causes are numerous for doing this.)
2. I want to know only direct connections (I also have a virtual connection's screen) so I can get good history for the example of Last 24 Hours. (Again, the reasons are numerous.)
Below is the code I am using but it does not show correctly because U"DT store its data in UTC instead of local time. I need help in getting the conversion to local time that SW uses to correct the Database time information. (Yes, they store it in UTC to overcome other problems!)
I used SWQL to write this:
SELECT u.UserID, u.AccountName, u.FirstName, u.LastName, u.IPAddresses.IP.IPAddress, u.IPAddresses.IP.DNSNames.DNSName, u.IPAddresses.IP.DNSNames.IPAddress,
u.IPAddresses.IP.Endpoint.Ports.Port.Node.NodeName, u.IPAddresses.IP.Endpoint.Ports.Port.Name,
tolocal(u.IPAddresses.LogonDateTime) as LogonTime
FROM Orion.UDT.User u
Where
u.AccountName like '%${SEARCH_STRING}%'
and u.IPAddresses.IP.Endpoint.Ports.ConnectionType = 1
and u.IPAddresses.LogonDateTime >= ADDHOUR(-24, GETUTCDATE())
order by u.IPAddresses.LogonDateTime DESC
thanks,
Mark