mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Add new VC metrics for beacon node availability (#3193)
## Issue Addressed #3154 ## Proposed Changes Add three new metrics for the VC: 1. `vc_beacon_nodes_synced_count` 2. `vc_beacon_nodes_available_count` 3. `vc_beacon_nodes_total_count` Their values mirror the values present in the following log line: ``` Apr 08 17:25:17.000 INFO Connected to beacon node(s) synced: 4, available: 4, total: 4, service: notifier ```
This commit is contained in:
@@ -306,8 +306,18 @@ impl<T: EthSpec> ProductionValidatorClient<T> {
|
||||
&http_metrics::metrics::ETH2_FALLBACK_CONFIGURED,
|
||||
num_nodes.saturating_sub(1) as i64,
|
||||
);
|
||||
// Initialize the number of connected, synced fallbacks to 0.
|
||||
// Set the total beacon node count.
|
||||
set_gauge(
|
||||
&http_metrics::metrics::TOTAL_BEACON_NODES_COUNT,
|
||||
num_nodes as i64,
|
||||
);
|
||||
|
||||
// Initialize the number of connected, synced beacon nodes to 0.
|
||||
set_gauge(&http_metrics::metrics::ETH2_FALLBACK_CONNECTED, 0);
|
||||
set_gauge(&http_metrics::metrics::SYNCED_BEACON_NODES_COUNT, 0);
|
||||
// Initialize the number of connected, avaliable beacon nodes to 0.
|
||||
set_gauge(&http_metrics::metrics::AVAILABLE_BEACON_NODES_COUNT, 0);
|
||||
|
||||
let mut beacon_nodes: BeaconNodeFallback<_, T> =
|
||||
BeaconNodeFallback::new(candidates, context.eth2_config.spec.clone(), log.clone());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user