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
Expose metrics for prometheus #8004
Comments
This requires Minetest running a HTTP server privately. There are Prometheus libraries for this. Integrating this in the engine would allow better exposing of internal stats. I would personally find this very useful Other useful stats:
|
we have many internal metrics which can be refactored to create a generic backend and make an exported read it :) |
Library-candidate: https://github.com/jupp0r/prometheus-cpp |
@thomasrudin take your timei the 5.0.0 roadmap is closed to new features. We are polishing the remaining in-dev features and we will trigger the freeze. |
This branch adds a generic API for stats: https://github.com/rubenwardy/minetest/tree/get_stats However, it obviously doesn't have any of the backend needed for a more complex stats method. local stats = minetest.get_stats()
stats = {
uptime = 124,
max_lag = 0.2345,
} |
I started developing a solution for the prometheus monitoring. monitoring.h
monitoring.cpp
The idea is, that if the prometheus-cpp library is not available there will be a No-Op monitoring implementation. That way you don't need all those # Example:https://github.com/thomasrudin-mt/minetest/blob/prometheus-wip/src/server.cpp#L410 m_tick_count_metric = g_monitoring->createCounter(
"minetest_engine_tick_count",
"The server tick count"
); TODO
|
Issue type
Minetest version
OS / Hardware
Operating system: ArchLinux
CPU: AMD FX8350
GPU model: Radeon RX580
OpenGL version: 4.6
Summary
Currently we have embedded metrics. Add a prometheus exporter in minetest to read those metrics.
This can need some refactor on the current metric model but it can be very nice to servers owners to graph lua memory size, connected players, and various other metrics embedded inside code.
Metrics useful to expose
Here are interesting metrics we can expose (please push more metrics you want, i will complete)
The text was updated successfully, but these errors were encountered: