Title
#general
j

Joe B

08/09/2022, 7:11 PM
Hi, all! Got a quick Fleet question. Is it easy to get stats on user logins and usage times? Thanks!
j

Jason

08/09/2022, 7:13 PM
Depends on the platform. Which ones do you want the data for ?
j

Joe B

08/09/2022, 7:14 PM
Win / Mac, thanks!
j

Jason

08/09/2022, 7:17 PM
For Mac, I know you can use the
last
table to last login times, and the
apps
table to get the last time an application was opened.
7:18 PM
for Windows you'd probably need to grab just the events you are interested in from the
windows_eventlog
table
7:19 PM
there's also the
uptime
table which works on all platforms
7:19 PM
but generally just go spelunking through https://osquery.io/schema/5.4.0
j

Joe B

08/09/2022, 7:20 PM
Cool, thank you for all of that! I’m hoping to get good stats of how much use computers get; can you think of a better way to query that? 🙂
j

Jason

08/09/2022, 7:24 PM
Hm depends on what you by “use” ? Can you clarify?
j

Joe B

08/09/2022, 7:34 PM
We want to know how much actual use machines get, as opposed to which machines sit idle each day.
7:35 PM
So, login gets us partway there, but some people leave themselves logged in, so trying to find a better metric
j

Jason

08/09/2022, 7:35 PM
Ah. You could probably sample cpu usage then every 15 minutes or something like that
7:36 PM
Or try and use the ‘processes’ table to determine new processes being spun up
j

Joe B

08/09/2022, 7:36 PM
yeah, thanks for the ideas! it seems like Fleet is a very versatile tool
7:37 PM
looking forward to playing with it
j

Jason

08/09/2022, 7:37 PM
Yeah it's really up to your imagination
j

Joe B

08/09/2022, 7:37 PM
I just hope I can find a good query to base our statistics on 😉
Luke Heath

Luke Heath

08/09/2022, 8:33 PM
@Joe B Just a heads up that there is a dedicated #fleet channel that you may find helpful.