NuRaft
NuRaft copied to clipboard
Monitoring data exposed for cluster?
Does Nuraft have any monitoring data exposed to monitor the status of raft quorum? like Prometheus format metrics or some events?
NuRaft has its own stats defined like this https://github.com/eBay/NuRaft/blob/9d7c4cb04d0fe0e18e6b2ae4fbef503bfa7da8f0/src/buffer.cxx#L89-L96
and then gathered like this https://github.com/eBay/NuRaft/blob/9d7c4cb04d0fe0e18e6b2ae4fbef503bfa7da8f0/tests/unit/asio_service_test.cxx#L2573-L2580
but not that many. If you want to export metrics to external components like Prometheus, you can put it in your event callbacks, state machine, or log store code. In eBay, we are reporting Raft-related metrics to Prometheus in that way.
@greensky00 I see. Thanks for reply.
@greensky00 The metrics you exported are in project Jungle? i didn't find related code block in repo. want to have an sample.
Jungle is another building block that is used for implementing log store and state machine. Metrics are defined in the upper layer that is using NuRaft and Jungle as a component, but that is not open-sourced.