Skip to content

Instantly share code, notes, and snippets.

@jr00ck
Forked from jshufro/how.md
Last active January 15, 2024 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jr00ck/1099935e5b6153171d84e2b05374a5d7 to your computer and use it in GitHub Desktop.
Save jr00ck/1099935e5b6153171d84e2b05374a5d7 to your computer and use it in GitHub Desktop.
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:
    name: rocketpool_net
    external: true

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

@jr00ck
Copy link
Author

jr00ck commented Jan 15, 2024

Script includes some fixes provided by 0xpatches and @haloooloolo on Rocket Pool #support Discord.

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