Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve metrics #91

Open
gsiv opened this issue Oct 7, 2021 · 4 comments
Open

Retrieve metrics #91

gsiv opened this issue Oct 7, 2021 · 4 comments
Milestone

Comments

@gsiv
Copy link
Member

gsiv commented Oct 7, 2021

It would be much appreciated if openslides could print out certain metrics. I'm sure, there are going to be more ideas but for starters it should include:

  • the number of (active) meetings
  • the number of (active) users
  • the number of events in the datastore
@normanjaeckel
Copy link
Member

Ok. Please bring this topic to the daily (or weekly) meeting and let me know how to get these information. The manage service can send requests to datastore, autoupdate, auth etc. and collect the answers.

@gsiv
Copy link
Member Author

gsiv commented Mar 9, 2022

* the number of (active) meetings
* the number of (active) users

This has become possible in the meantime, great!

* the number of events in the datastore

AFAIK, this has not been implemented yet.

Additionally, we would like to retrieve:

  • the number of logged-in users
  • the number of connections opened by users

@jsangmeister can hopefully help figure out how to collect the relevant data.

@jsangmeister
Copy link
Contributor

  • the number of events in the datastore

This is currently already possible with the migrations command stats which also outputs general infos about the datastore positions and events. ATM, the output is only in the form of a long string message, but this will change in OpenSlides/openslides-backend#1249 so it returns a JSON object instead. If you want, we could also move this to another place, but this would require some restructuring and additional routes, so I would like to just use this method, even though the place may not be 100% correct.

  • the number of logged-in users

This would be a task for the auth service, since this is the only place with knowledge about that. As far as I understand it, the auth service already holds information about all logged in users in a cache, so this should be easy to implement. But @GabrielInTheWorld can probably say more about this.

  • the number of connections opened by users

This would need to be done in the autoupdate service, but I don't know how hard it would be to gather stats about this. The better point would also probably be the caddy/proxy which routes all requests, but I don't think it's possible to programmatically access information about it via HTTP, but then again, I don't know enough about this part of the setup. So @ostcar @gsiv you should probably chat about this.

@ostcar
Copy link
Member

ostcar commented Mar 10, 2022

For the autoupdate-service and icc-service, it would be quite easy to get the number of all connections.

How do you like this information? I would propose that I add a /metirc url that returns that info.

It would also be not to hard to get the number of connections for each user. But I don't know how to present this information.

@normanjaeckel normanjaeckel added this to the 4.1 milestone Apr 8, 2022
@jsangmeister jsangmeister modified the milestones: 4.1, 4.2 Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants