-
Notifications
You must be signed in to change notification settings - Fork 502
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
[Enhancement]: Metrics endpoint for monitoring #3831
Comments
What kind of metrics do you expect to be exposed? |
Just some ideas off the top of my head would be
Maybe even library specific stuff such as number of audiobooks in libraries or size of libraries. EDIT: typo |
Would love to see this also 😉 |
Thanks for writing to a list. Some of this would be addressed by #3335, but not sure if that same endpoint should return everything or add a new endpoint with all of the information. |
Prometheus expects a single metrics endpoint for scrape jobs. I'm not sure how other monitoring solutions work in this regard. Therefore, at least for Prometheus users, it would be convenient to have a single endpoint for all the metrics we want to expose. |
Type of Enhancement
Server Backend
Describe the Feature/Enhancement
It would be awesome if there was some way to be able to expose some server metrics to some external application. Other projects do this by exposing a
/metrics
endpoint where some client can authenticate and collect these metrics.Why would this be helpful?
I have set up Prometheus for collecting metrics from my self-hosted services and visualize them with Grafana. As far as I know, this is a pretty common setup. This is useful when something goes wrong, and I need to troubleshoot.
Future Implementation (Screenshot)
We could create a
MetricsController
and then route any requests to the/metrics
endpoint to this controller. Within the metrics controller, we would then need to check whether the request is authenticated, i.e. if the user may access the metrics endpoint.For authentication, we could add a permission such as
canAccessMetrics
to the users model and then check if it's set.If the request is authenticated, the response contains some metrics data in e.g. JSON format.
Audiobookshelf Server Version
v1.17.7
Current Implementation (Screenshot)
No response
The text was updated successfully, but these errors were encountered: