nimbus-eth2 icon indicating copy to clipboard operation
nimbus-eth2 copied to clipboard

Add metrics for syncing status

Open zah opened this issue 2 years ago • 2 comments

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.

zah avatar Aug 17 '22 13:08 zah

head slot and sync distance are already there (via beacon_head_slot and beacon_slot) - info about optimistic is missing indeed

arnetheduck avatar Aug 17 '22 13:08 arnetheduck

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.

jakubgs avatar Aug 17 '22 14:08 jakubgs