status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
523 stars 227 forks source link

Add beacon node count metrics #6371

Closed jhett12321 closed 2 months ago

jhett12321 commented 3 months ago

The validator client provides a useful summary of beacon node health in the slot start log entries.

image

This PR exposes these node count values as a new validator metric, so they can be used as potential health checks.

# HELP validator_client_node_counts Number of connected beacon nodes and their status
# TYPE validator_client_node_counts gauge
validator_client_node_counts{status="bad"} 0.0
validator_client_node_counts_created{status="bad"} 1718820863.0
validator_client_node_counts{status="good"} 2.0
validator_client_node_counts_created{status="good"} 1718820863.0
validator_client_node_counts{status="viable"} 0.0
validator_client_node_counts_created{status="viable"} 1718820863.0
github-actions[bot] commented 3 months ago

Unit Test Results

         9 files  ±0    1 328 suites  ±0   32m 52s :stopwatch: -51s   4 998 tests ±0    4 650 :heavy_check_mark: ±0  348 :zzz: ±0  0 :x: ±0  20 850 runs  ±0  20 446 :heavy_check_mark: ±0  404 :zzz: ±0  0 :x: ±0 

Results for commit 242d6fef. ± Comparison against base commit f30f6705.