Avans-ATGM / infrastructure

ATGM Infrastructure Repository
0 stars 2 forks source link

cocalc stats #33

Closed hexylena closed 1 year ago

hexylena commented 2 years ago

we need a dashboard for cocalc.

^[[Asmc=# select * from stats order by time desc limit 1;
-[ RECORD 1 ]----+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id               | 2e719b48-f861-4d14-b453-60f0f5c5f117
time             | 2022-02-04 12:48:29.53
accounts         | 38
accounts_created | {"1d": 11, "1h": 0, "7d": 11, "30d": 12}
accounts_active  | {"1d": 35, "1h": 31, "7d": 36, "30d": 36, "5min": 29}
files_opened     | {"total": {"1d": {"md": "4", "txt": "1", "term": "17", "ipynb": "230", "course": "30"}, "1h": {"ipynb": "60", "course": "5"}, "7d": {"md": "20", "png": "3", "txt": "7", "term": "24", "ipynb": "354", "course": "42"}, "30d": {"md": "38", "py": "7", "png": "29", "txt": "14", "x11": "5", "term": "45", "ipynb": "490", "course": "79", "sage-chat": "2"}}, "distinct": {"1d": {"md": "2", "txt": "1", "term": "14", "ipynb": "40", "course": "2"}, "1h": {"ipynb": "4", "course": "2"}, "7d": {"md": "4", "png": "1", "txt": "6", "term": "17", "ipynb": "83", "course": "2"}, "30d": {"md": "4", "py": "4", "png": "5", "txt": "10", "x11": "3", "term": "27", "ipynb": "112", "course": "4", "sage-chat": "1"}}}
projects         | 114
projects_created | {"1d": 66, "1h": 4, "7d": 67, "30d": 82}
projects_edited  | {"1d": 76, "1h": 65, "7d": 80, "30d": 86, "5min": 27}
hub_servers      | {"{\"host\": \"0.0.0.0-443\", \"clients\": 30}"}
running_projects | {"free": 78, "member": 0}

that's something, sql query inside docker, I can translate that.

select title, status ->> 'hub-server.port' from projects;

I THINK lines up with runnin projects

Dirowa commented 1 year ago

Note to self @Dirowa,

Verify if it works and wrap it up in a sop so we can always reach it