-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add Prometheus/OpenMetrics endpoint with a number of useful metrics #561
Conversation
2a9506a
to
bd74ede
Compare
🚀 This PR was deployed at https://pr561.tobira.opencast.org. The deployment will be updated whenever someone pushes onto this PR's branch. |
FWIW: I just checked why requests to |
For the record: The format of |
This comment was marked as resolved.
This comment was marked as resolved.
It is apparently common practice to expose this information as tags in a single gauge value of 1. This can be displayed nicely with the table visualization and the "labels to fields" transformation in Grafana.
This makes it easier to show all things in a graph in Grafana, for example.
bd74ede
to
424af4a
Compare
Counting requests probably do not work like this if Tobira is deployed as a cluster. Especially if you have a dynamic cluster like in a 58s environment. You only count requests per instance. |
That is correct. Isn't it possible to easily add up the counters of all nodes in prometheus or grafana? Like... I don't want to have a counter in the DB for this as it would add immense overhead to every request. How do other applications do this? |
442961b
to
ded929e
Compare
ded929e
to
232e364
Compare
I also tweaked tiny things about two panels.
Closes #80
This PR adds the
/~metrics
endpoint (fortobira serve
). This endpoint exposes several metrics in the OpenMetrics format, which are tailored to Prometheus and Grafana. Many metrics are collected on the fly when the endpoint is requested, a few others are constantly collected/counted.To see which metrics are added, take a look at constants at the top of
metrics.rs
. Of course, there are many more metrics one can expose. I plan to collect ideas for those in this issue: #562I tried to keep the commits atomic, but I would guess reviewing it all in one go is better for this PR.
Pretty screenshots of the example Dashboard: