Easy said to be honest.
I dont find the appropriate tables/data to create such a request.
Is there some kind of table with statistical data? I cannot query the whole events db for connect, disconnect, etc and count them later.
I would just need those numbers as displayed in the admin desktop dashboard for a day (by hour) or a week (by day).
In example:
Day 1
Hour 0
300 connected
200 disconnected
100 available
5 agent-unreachable
Hour 1
400 connected
100 disconnected
100 available
5 agent-unreachable
and so on.