Configurable monitoring endpoint frequency (#3530)

## Issue Addressed

Closes #3514

## Proposed Changes

- Change default monitoring endpoint frequency to 120 seconds to fit with 30k requests/month limit.
- Allow configuration of the monitoring endpoint frequency using `--monitoring-endpoint-frequency N` where `N` is a value in seconds.
This commit is contained in:
Michael Sproul
2022-09-05 08:29:00 +00:00
parent 177aef8f1e
commit 9a7f7f1c1e
9 changed files with 105 additions and 4 deletions

View File

@@ -48,3 +48,39 @@ Check to ensure that the metrics are available on the default port:
```bash
curl localhost:5064/metrics
```
## Remote Monitoring
Lighthouse has the ability to send a subset of metrics to a remote server for collection. Presently
the main server offering remote monitoring is beaconcha.in. Instructions for setting this up
can be found in beaconcha.in's docs:
- <https://kb.beaconcha.in/beaconcha.in-explorer/mobile-app-less-than-greater-than-beacon-node>
The Lighthouse flag for setting the monitoring URL is `--monitoring-endpoint`.
When sending metrics to a remote server you should be conscious of security:
- Only use a monitoring service that you trust: you are sending detailed information about
your validators and beacon node to this service which could be used to track you.
- Always use an HTTPS URL to prevent the traffic being intercepted in transit.
The specification for the monitoring endpoint can be found here:
- <https://github.com/gobitfly/eth2-client-metrics>
_Note: the similarly named [Validator Monitor](./validator-monitoring.md) feature is entirely
independent of remote metric monitoring_.
### Update Period
You can adjust the frequency at which Lighthouse sends metrics to the remote server using the
`--monitoring-endpoint-period` flag. It takes an integer value in seconds, defaulting to 60
seconds.
```
lighthouse bn --monitoring-endpoint-period 60 --monitoring-endpoint "https://url"
```
Increasing the monitoring period between can be useful if you are running into rate limits when
posting large amounts of data for multiple nodes.

View File

@@ -4,6 +4,9 @@ Lighthouse allows for fine-grained monitoring of specific validators using the "
Generally users will want to use this function to track their own validators, however, it can be
used for any validator, regardless of who controls it.
_Note: If you are looking for remote metric monitoring, please see the docs on
[Prometheus Metrics](./advanced_metrics.md)_.
## Monitoring is in the Beacon Node
Lighthouse performs validator monitoring in the Beacon Node (BN) instead of the Validator Client