mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Add metrics to VC (#1954)
## Issue Addressed NA ## Proposed Changes - Adds a HTTP server to the VC which provides Prometheus metrics. - Moves the health metrics into the `lighthouse_metrics` crate so it can be shared between BN/VC. - Sprinkle some metrics around the VC. - Update the book to indicate that we now have VC metrics. - Shifts the "waiting for genesis" logic later in the `ProductionValidatorClient::new_from_cli` - This is worth attention during the review. ## Additional Info - ~~`clippy` has some new lints that are failing. I'll deal with that in another PR.~~
This commit is contained in:
@@ -30,5 +30,21 @@ curl localhost:5054/metrics
|
||||
|
||||
## Validator Client Metrics
|
||||
|
||||
The validator client does not *yet* expose metrics, however this functionality
|
||||
is expected to be implemented in late-September 2020.
|
||||
|
||||
By default, these metrics are disabled but can be enabled with the `--metrics`
|
||||
flag. Use the `--metrics-address`, `--metrics-port` and
|
||||
`--metrics-allow-origin` flags to customize the metrics server.
|
||||
|
||||
### Example
|
||||
|
||||
Start a validator client with the metrics server enabled:
|
||||
|
||||
```bash
|
||||
lighthouse vc --metrics
|
||||
```
|
||||
|
||||
Check to ensure that the metrics are available on the default port:
|
||||
|
||||
```bash
|
||||
curl localhost:5064/metrics
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user