Skip to content

Instantly share code, notes, and snippets.

@jshufro

jshufro/how.md Secret

Last active January 22, 2023 01:04
Embed
What would you like to do?
Configuring Beaconcha.in HW Monitoring for Nimbus Smartnode

Configuring Beaconcha.in HW Monitoring for Nimbus Smartnode

Disclaimer

It's generally a Bad Idea to run random scripts from the internet on your node unless you know what they're doing. To that end, please read and try to understand this before installing it, and only install it if you feel comfortable.

Installation

Make a new docker-compose.yml file in your home directory:

touch ~/docker-compose.yml

Edit it with your favorite text editor, eg nano ~/docker-compose.yml

Populate it like this (you need to fill in YOUR_API_KEY, which you can get in your beaconcha.in account settings, and YOUR_NODE_NAME which can be any string (without spaces):

version: "3.7"
services:
  eth2-client-metrics-exporter:
    image: gobitfly/eth2-client-metrics-exporter
    container_name: eth2-client-metrics-exporter
    restart: unless-stopped
    command:
      - --server.address=https://beaconcha.in/api/v1/client/metrics?apikey=YOUR_API_KEY&machine=YOUR_NODE_NAME
      - --system.partition=/host/rootfs
      - --beaconnode.type=nimbus
      - --beaconnode.address=http://eth2:9100/metrics
    volumes:
      - /sys:/host/sys:ro
      - /proc:/host/proc:ro
      - /:/host/rootfs:ro
    environment:
      - HOST_PROC=/host/proc
      - HOST_SYS=/host/sys
networks:
  default:
    external:
      name: rocketpool_net

Then, pull the image with docker-compose pull
Start the container with docker-compose up -d

Note: The beaconcha.in app has a 10 to 15 minute delay before data will start to show up.

Maintenance

Periodically, you may want to update the image by running docker-compose pull and then docker-compose up -d.

If you need to check the logs to debug, you can use docker logs eth2-client-metrics-exporter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment