cli to push metrics to aggregator service (#8835)

* new prometheus metrics for client-stats metrics

* adds client-stats types beacause they are
  used by some of the prometheus collection code.
* new prometheus collector for db disk size
* new prometheus collector for web3 client
  connection status

* adds client-stats api push cli in cmd/client-stats

* adds api metadata to client-stats collector posts

* appease deepsource

* mop up copypasta

* use prysm assert package for testing
This commit is contained in:
kasey
2021-05-03 09:57:26 -05:00
committed by GitHub
parent a6e1ff0e63
commit dace0f9b10
16 changed files with 869 additions and 4 deletions

View File

@@ -312,7 +312,7 @@ func (s *Service) Status() error {
return nil
}
func (s *Service) updateBeaconnodeStats() {
func (s *Service) updateBeaconNodeStats() {
bs := clientstats.BeaconNodeStats{}
if len(s.httpEndpoints) > 1 {
bs.SyncEth1FallbackConfigured = true
@@ -329,12 +329,12 @@ func (s *Service) updateBeaconnodeStats() {
func (s *Service) updateCurrHttpEndpoint(endpoint httputils.Endpoint) {
s.currHttpEndpoint = endpoint
s.updateBeaconnodeStats()
s.updateBeaconNodeStats()
}
func (s *Service) updateConnectedETH1(state bool) {
s.connectedETH1 = state
s.updateBeaconnodeStats()
s.updateBeaconNodeStats()
}
// IsConnectedToETH1 checks if the beacon node is connected to a ETH1 Node.