Skip to content

Instantly share code, notes, and snippets.

@jshufro

jshufro/how.md Secret

Last active June 15, 2024 19:47
Show Gist options
  • Save jshufro/89e32d417801bf3dfb02c32a983b63cf to your computer and use it in GitHub Desktop.
Save jshufro/89e32d417801bf3dfb02c32a983b63cf 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

jr00ck commented Jan 15, 2024

I forked & applied fixes here

Gist doesn't support pull requests, I guess.

@jshufro
Copy link
Author

jshufro commented Jan 15, 2024

I forked & applied fixes here

Gist doesn't support pull requests, I guess.

"merged", thank you!

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