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

added warning if node is unhealthy #6833

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/validator/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ export class Validator {

this.clock.runEverySlot(() =>
this.fetchBeaconHealth()
.then((health) => metrics.beaconHealth.set(health))
.then((health) => {metrics.beaconHealth.set(health);
if(health == 0){
this.logger.warn("Node is unhealthy");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can't be checked here as the getHealth call here will be retried to fallback nodes, meaning this log will only be triggered if all connected nodes are unhealthy which is not what we want as per issue.

Please double check what was noted in the issue, we might have to use the url score tracked in the http client internally to determine if primary node is unhealthy, this also avoids false positives, i.e. a single failed request will not trigger an unhealthy warning.

See also related PR #6415 on how we currently track if primary node is unhealthy in metrics.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understood how to solve it , thanks for the info , will be back with the fix .

}})
.catch((e) => this.logger.error("Error on fetchBeaconHealth", {}, e))
);
}
Expand Down
Loading