lighthouse/book
Mac L 8cb9b5e126 Expose certain validator_monitor metrics to the HTTP API (#3760)
## 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.
2022-12-09 06:39:19 +00:00
..
src Expose certain validator_monitor metrics to the HTTP API (#3760) 2022-12-09 06:39:19 +00:00
.gitignore Add newly created mdbook 2019-09-01 11:31:18 +10:00
book.toml Update HTTP API docs (#1010) 2020-04-16 20:31:43 +10:00
README.md Update HTTP API docs (#1010) 2020-04-16 20:31:43 +10:00

Lighthouse Book

Contains an mdBook that serves as the primary source of Lighthouse user documentation.

The book is hosted at lighthouse-book.sigmaprime.io

Usage

The mdBook docs are the best source of information for building the book.

Example

  1. Install mdBook: $ cargo install mdbook
  2. Build the book, open it in a browser and build after file changes: $ mdbook serve --open