Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display "BeaconNode far behind" on grafana #1967

Closed
1 task
xenowits opened this issue Mar 29, 2023 · 0 comments
Closed
1 task

Display "BeaconNode far behind" on grafana #1967

xenowits opened this issue Mar 29, 2023 · 0 comments
Assignees
Labels
protocol Protocol Team tickets

Comments

@xenowits
Copy link
Contributor

xenowits commented Mar 29, 2023

🎯 Problem to be solved

Beacon node for some nodes may lag a lot behind the head slot. We should alert this to the node operator on the grafana Healthy panel.

🛠️ Proposed solution

Add another const to app/metrics.go:

// readyzBeaconNodeFarBehind indicates that readyz is returning 500s since the Beacon Node is too far behind the head slot.
readyzBeaconNodeFarBehind = 8

Add the following logic to app/monitoring.go:

if beaconNodeDown {}
else if beaconNodeSyncing {}
else if beaconNodeZeroPeers {}
# The following is a new addition
else if beaconNodeFarBehind {  readyzGauge.Set(readyzBeaconNodeFarBehind) }
...

BN far behind is TRUE if beacon_node_sync_distance > 320 slots. This is a fair threshold as 320 slots correspond to 10 epochs which is around 60 minutes.

So, it should potentially follow this

if beacon_node_not_syncing AND beacon_node_sync_distance > 320 slots { "BN far behind" }

If the panel shows "BeaconNode far behind" means that the operators need to check their Beacon Node for potential syncing issues.

🧪 Tests

  • Tested by new automated unit tests
@github-actions github-actions bot added the protocol Protocol Team tickets label Mar 29, 2023
@xenowits xenowits changed the title Display "BeaconNode far behind" on Healthy grafana panel Display "BeaconNode far behind" on grafana Mar 29, 2023
@xenowits xenowits self-assigned this Apr 3, 2023
obol-bulldozer bot pushed a commit that referenced this issue Apr 3, 2023
Adds "BeaconNode far behind" metric value to `/readyz`. This would help node operators to monitor their beacon node health if the `Healthy` panel shows `BeaconNode far behind` for a longer time.

category: feature
ticket: #1967
@xenowits xenowits closed this as completed Apr 3, 2023
LukeHackett12 pushed a commit that referenced this issue Apr 11, 2023
Adds "BeaconNode far behind" metric value to `/readyz`. This would help node operators to monitor their beacon node health if the `Healthy` panel shows `BeaconNode far behind` for a longer time.

category: feature
ticket: #1967
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol Protocol Team tickets
Projects
None yet
Development

No branches or pull requests

1 participant