Observable counters and state for a Raft node.
Access via Node#metrics. Counters are incremented internally as the
node operates. All fields are readable and can be scraped for monitoring.
Instance methods
batches_processed
Number of times a client-request batch was processed by the leader.
Each batch may contain one or more proposals. For concurrent workloads,
this should be less than proposals_committed when batching is active.
Sourcebatches_processed=(batches_processed :
UInt64)
Number of times a client-request batch was processed by the leader.
Each batch may contain one or more proposals. For concurrent workloads,
this should be less than proposals_committed when batching is active.
Sourcecommit_index
Index of the highest committed log entry.
Sourcecommit_index=(commit_index :
UInt64)
Index of the highest committed log entry.
Sourceelections_started
Number of elections this node has initiated.
Sourceelections_started=(elections_started :
UInt64)
Number of elections this node has initiated.
Sourceelections_won
Number of elections this node has won (became leader).
Sourceelections_won=(elections_won :
UInt64)
Number of elections this node has won (became leader).
Sourceentries_applied
Total number of log entries applied to the state machine.
Sourceentries_applied=(entries_applied :
UInt64)
Total number of log entries applied to the state machine.
Sourceproposals_committed
Number of client proposals that were committed and applied.
Sourceproposals_committed=(proposals_committed :
UInt64)
Number of client proposals that were committed and applied.
Sourcerole
Current role as a string: "follower", "candidate", or "leader".
SourceCurrent role as a string: "follower", "candidate", or "leader".
Sourcesnapshots_installed
Number of snapshots installed from a leader.
Sourcesnapshots_installed=(snapshots_installed :
UInt64)
Number of snapshots installed from a leader.
Sourceto_h
Returns all metrics as a flat hash.
Source