-
Notifications
You must be signed in to change notification settings - Fork 113
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
Export site metrics in Prometheus #698
Comments
Develop a metrics package that exports site metrics to prometheus. |
@ishank011 So I am able to do grpc calls with basic authentication (user/pass). Now how do I get a token (authenticate my request) if I don't have user. Which is the case for the metrics package. I guess I should use this shared jwt_secret somehow ... ? |
@redblom The way other packages do it is that the HTTP or GRPC services pass the context which contains the token to the package methods like done here. But with the metrics package, since the methods execute in the background as goroutines, this won't be possible. What would be the use case for this? The metrics methods should ideally be unprotected anyway. |
@ishank011 The metrics should be retrieved from the underlying EFSS/storage. The CS3 api has useful methods to get this data so why not use that (I would think it's the preferred way). But the CS3 api requires authentication. |
@hugo Hi Hugo, could you enlighten me with your view on the above? |
Hi @redblom, using the CS3APIS will be an option, note that currently there are not such method to obtain this information so the APIS need to be extended. I'll discuss it with @ishank011 today and let you know by noon. |
@redblom, apologies for the delay. I was on leave for the last couple of days. After discussing with @labkode, we decided to go with not adding the stats to CS3APIs, since the primary method to gather these stats would be to execute external scripts which would need to be executed on the same host. So I've refactored the metrics package using which you can define multiple drivers to populate stats, and these can register their views themselves, making it more flexible to add new stats. The next step is to complete the logic for the |
@ishank011 Ishank, could you tell me precisely what we are trying to achieve here? |
@redblom, the drivers represent the multiple ways in which metrics can be read, one of which is to read those using external scripts, which ties with this task: sciencemesh/sciencemesh#125. All the drivers are expected to implement the Reader interface. Also, this change enables us to register metrics from multiple packages and services, whereas previously each of these had to be imported in the prometheus service and registered separately. @labkode must have discussed with you how to proceed with the above task and how exactly these scripts would be executed. I'm not familiar with how that is to be done so you might want to discuss that with him. |
@redblom you're supposed to write a driver that reads the metrics from a file, I'd suggest JSON. |
PR #973 created. @ishank011 : ready for review. |
sciencemesh/sciencemesh#30
The text was updated successfully, but these errors were encountered: