Giter Site home page Giter Site logo

eth2-client-metrics-exporter's Introduction

eth2-client-metrics-exporter

A sidecar for exporting eth2-client-metrics.

How to use

  1. Start beaconnode and/or validator with metrics-endpoints enabled.

  2. Get your server.address by signing in to https://beaconcha.in/user/settings#app and copy the URL.

  3. Start the eth2-client-metrics-exporter and point it to your beaconnode and/or validator.

For a more comprehensive guide please take a look at the beaconchain-knowledge-base.

Example with binary

Make sure to run your beaconnode and/or validator with metrics enabled (in case of Nimbus for example use these flags --metrics --metric-port=8008).

Then point the exporter at this metrics-endpoint:

./eth2-client-metrics-exporter-linux-amd64 \
    --server.address='https://beaconcha.in/api/v1/client/metrics?apikey=<beaconcha.in-apikey>&machine=<machine-name>' \
    --beaconnode.type=nimbus \
    --beaconnode.address=http://localhost:8008/metrics \

Example with docker

version: "3.7"
services:
  # run prysm-node with metrics enabled
  prysm-node:
    image: gcr.io/prysmaticlabs/prysm/beacon-chain
    command:
      - --accept-terms-of-use
      - --datadir=/data
      - --monitoring-port=9090
      - --monitoring-host=0.0.0.0
    volumes:
      - ./docker-volumes/prysm-node:/data
    restart: always

  # run prysm-validator with metrics enabled
  prysm-validator:
    image: gcr.io/prysmaticlabs/prysm/validator
    restart: unless-stopped
    command:
      - --accept-terms-of-use
      - --beacon-rpc-provider=prysm-node:4000
      - --wallet-password-file=/v/wallet-password.txt
      - --monitoring-port=9090
      - --monitoring-host=0.0.0.0
    volumes:
      - ./docker-volumes/prysm-validator:/home/.eth2
      - ./wallet-password.txt:/v/wallet-password.txt

  # point exporter to metrics of beaconnode and/or validator
  eth2-client-metrics-exporter:
    image: gobitfly/eth2-client-metrics-exporter
    restart: unless-stopped
    command:
      - --server.address=https://beaconcha.in/api/v1/client/metrics?apikey=<apikey>&machine=<machine>
      - --system.partition=/host/rootfs
      - --beaconnode.type=prysm
      - --beaconnode.address=http://prysm-node:9090/metrics
      - --validator.type=prysm
      - --validator.address=http://prysm-validator:9090/metrics
    volumes:
      - /sys:/host/sys:ro
      - /proc:/host/proc:ro
      - /:/host/rootfs:ro
    environment:
      - HOST_PROC=/host/proc
      - HOST_SYS=/host/sys

Build

  • Requirement: Go 1.16
git clone https://github.com/gobitfly/eth2-client-metrics-exporter.git
cd eth2-client-metrics-exporter 
make

client support status

  • Lighthouse
    • Lighthouse has its own metrics-exporter built in and it works out of the box, no need for this extra program right now
  • Teku
    • Teku has its own metrics-exporter built in and it works out of the box, no need for this extra program right now
  • Lodestar
    • has its own metrics-exporter built-in which can be enabled by passing the --monitoring.endpoint CLI flag, see client monitoring for details.
  • Nimbus
    • beaconnode is partially implemented
    • validator is not implemented
  • Prysm
    • missing
      • beaconnode
        • sync_eth2_fallback_configured
        • sync_eth2_fallback_connected
        • network_libp2p_bytes_total_transmit
        • sync_eth1_connected
        • sync_eth2_synced
        • sync_eth1_fallback_configured
        • sync_eth1_fallback_connected
        • slasher_active
      • validator
        • sync_eth2_fallback_configured
        • sync_eth2_fallback_connected

eth2-client-metrics-exporter's People

Contributors

buttaa avatar guybrush avatar manuelsc avatar nflaig avatar poupas avatar stefantalpalaru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

eth2-client-metrics-exporter's Issues

multiarch image contains an x86_64 binary in the linux/arm64 image

Repro:

docker pull gobitfly/eth2-client-metrics-exporter@sha256:4027601c42919776dc777c7f75f56911b23761db5199dd4100f1a520b349a47f (digest for latest, platform linux/arm64)
docker create --name tmp-test 445beab006c1 (image id for above digest)
docker cp tmp-test:/bin/eth2-client-metrics-exporter tmp-bin
file tmp-bin

tmp-bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, Go BuildID=9Yz-S0h-pvM-7NAaxP7U/pbDYMOnLTwEFZ223l8Jg/gMOWS0rFftvHTAde7rdl/f2VJXQYeZpwPlNsjb5Vq, not stripped

Beaconcha.in blocks requests

I logged in today and requests to beaconcha.in are being blocked by cloudflare with a message " beaconcha.in needs to review the security of your connection before proceeding."

This is probably more of an issue with beaconcha.in but I just wonder if theres anything that can be done on the exporter to prevent this? If it's just sending too much data too fast and triggering some firewall rule, it might help if we could configure the delay to send export data less frequently.

Request: eth2-client-metrics-exporter distributions

Following on from this (this metrics exporter client project didn't show up when I searched yesterday!)

I love eth2-client-metrics-exporter but running it from the command line is a pain and curl-pipe-bash scares me. Can you publish it as something installable in a more conventional way?

I'm thinking:

  • An image on Docker Hub or equivalent so I can run it the same way as the rest of my stack
  • And/or a .deb repo, for a client packaged with systemd unit files

CC-ing @recy21

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.