[Merged by Bors] - Expose certain validator_monitor metrics to the HTTP API #3760
Closed
macladson wants to merge 3 commits intosigp:unstablefrom
Closed
[Merged by Bors] - Expose certain validator_monitor metrics to the HTTP API #3760macladson wants to merge 3 commits intosigp:unstablefrom
validator_monitor metrics to the HTTP API #3760macladson wants to merge 3 commits intosigp:unstablefrom
Conversation
637d452 to
77d3ec9
Compare
Member
michaelsproul
left a comment
There was a problem hiding this comment.
This is great!
Do you know if the endpoint works even without --metrics turned on? If not I guess we should add --metrics to the --gui alias
I thought #3728 might conflict with this, but it seems like it should be fine for small numbers of vals (<64) by default. And the flag can be used to go beyond that
1c2789c to
23a6202
Compare
michaelsproul
approved these changes
Dec 9, 2022
Member
michaelsproul
left a comment
There was a problem hiding this comment.
Looks great on the whole!
Gonna merge this so we can have UI support in unstable for next week!
| let validator_ids = chain | ||
| .validator_monitor | ||
| .read() | ||
| .get_all_monitored_validators() |
Member
There was a problem hiding this comment.
This would maybe be a bit more succinct if we used the validator indices from the monitor rather than the string IDs, but I think it's also fine as is and don't want to slow down the PR on it.
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Dec 9, 2022
## Issue Addressed #3724 ## Proposed Changes Exposes certain `validator_monitor` as an endpoint on the HTTP API. Will only return metrics for validators which are actively being monitored. ### Usage ```bash curl -X GET "http://localhost:5052/lighthouse/ui/validator_metrics" -H "accept: application/json" | jq ``` ```json { "data": { "validators": { "12345": { "attestation_hits": 10, "attestation_misses": 0, "attestation_hit_percentage": 100, "attestation_head_hits": 10, "attestation_head_misses": 0, "attestation_head_hit_percentage": 100, "attestation_target_hits": 5, "attestation_target_misses": 5, "attestation_target_hit_percentage": 50 } } } } ``` ## Additional Info Based on #3756 which should be merged first.
|
Build failed (retrying...): |
bors bot
pushed a commit
that referenced
this pull request
Dec 9, 2022
## Issue Addressed #3724 ## Proposed Changes Exposes certain `validator_monitor` as an endpoint on the HTTP API. Will only return metrics for validators which are actively being monitored. ### Usage ```bash curl -X GET "http://localhost:5052/lighthouse/ui/validator_metrics" -H "accept: application/json" | jq ``` ```json { "data": { "validators": { "12345": { "attestation_hits": 10, "attestation_misses": 0, "attestation_hit_percentage": 100, "attestation_head_hits": 10, "attestation_head_misses": 0, "attestation_head_hit_percentage": 100, "attestation_target_hits": 5, "attestation_target_misses": 5, "attestation_target_hit_percentage": 50 } } } } ``` ## Additional Info Based on #3756 which should be merged first.
validator_monitor metrics to the HTTP API validator_monitor metrics to the HTTP API
macladson
added a commit
to macladson/lighthouse
that referenced
this pull request
Jan 5, 2023
## Issue Addressed sigp#3724 ## Proposed Changes Exposes certain `validator_monitor` as an endpoint on the HTTP API. Will only return metrics for validators which are actively being monitored. ### Usage ```bash curl -X GET "http://localhost:5052/lighthouse/ui/validator_metrics" -H "accept: application/json" | jq ``` ```json { "data": { "validators": { "12345": { "attestation_hits": 10, "attestation_misses": 0, "attestation_hit_percentage": 100, "attestation_head_hits": 10, "attestation_head_misses": 0, "attestation_head_hit_percentage": 100, "attestation_target_hits": 5, "attestation_target_misses": 5, "attestation_target_hit_percentage": 50 } } } } ``` ## Additional Info Based on sigp#3756 which should be merged first.
Woodpile37
pushed a commit
to Woodpile37/lighthouse
that referenced
this pull request
Jan 6, 2024
## Issue Addressed sigp#3724 ## Proposed Changes Exposes certain `validator_monitor` as an endpoint on the HTTP API. Will only return metrics for validators which are actively being monitored. ### Usage ```bash curl -X GET "http://localhost:5052/lighthouse/ui/validator_metrics" -H "accept: application/json" | jq ``` ```json { "data": { "validators": { "12345": { "attestation_hits": 10, "attestation_misses": 0, "attestation_hit_percentage": 100, "attestation_head_hits": 10, "attestation_head_misses": 0, "attestation_head_hit_percentage": 100, "attestation_target_hits": 5, "attestation_target_misses": 5, "attestation_target_hit_percentage": 50 } } } } ``` ## Additional Info Based on sigp#3756 which should be merged first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Addressed
#3724
Proposed Changes
Exposes certain
validator_monitoras an endpoint on the HTTP API. Will only return metrics for validators which are actively being monitored.Usage
{ "data": { "validators": { "12345": { "attestation_hits": 10, "attestation_misses": 0, "attestation_hit_percentage": 100, "attestation_head_hits": 10, "attestation_head_misses": 0, "attestation_head_hit_percentage": 100, "attestation_target_hits": 5, "attestation_target_misses": 5, "attestation_target_hit_percentage": 50 } } } }Additional Info
Based on #3756 which should be merged first.