nimbus-eth2
nimbus-eth2 copied to clipboard
Add metrics for syncing status
It would be useful if we provide metrics indicting the current syncing status (head slot, sync distance, is_optimistic) for users who rely exclusively on Grafana for monitoring their node.
head slot and sync distance are already there (via beacon_head_slot
and beacon_slot
) - info about optimistic is missing indeed
Oh I see, so the sync_distance
available via /eth/v1/node/syncing
is actually beacon_slot - beacon_head_slot
.
> c 0:55052/eth/v1/node/syncing
{"data":{"head_slot":"1395665","sync_distance":"3097738","is_syncing":true}}
> c 0:58008/metrics | awk '/^beacon_head_slot /{curr=$2} /^beacon_slot /{head=$2} END{print head-curr}'
3097727
That makes sense. And explains why I could not find that value in metrics.